Added memalloc pass to the compiler
This commit is contained in:
parent
1059329c0e
commit
9a7f9254d2
|
@ -3,8 +3,8 @@
|
||||||
<preproc.ml>: camlp4of, use_camlp4
|
<preproc.ml>: camlp4of, use_camlp4
|
||||||
<**/hept_parser.ml>: use_menhirLib
|
<**/hept_parser.ml>: use_menhirLib
|
||||||
<**/mls_parser.ml>: use_menhirLib
|
<**/mls_parser.ml>: use_menhirLib
|
||||||
<**/*.{byte,native}>: use_unix, use_str, link_menhirLib, debug
|
<**/*.{byte,native}>: use_unix, use_str, link_menhirLib, link_graph, debug
|
||||||
true: use_menhir
|
true: use_menhir, use_graph
|
||||||
|
|
||||||
<main/hepts.ml>: use_lablgtk, thread
|
<main/hepts.ml>: use_lablgtk, thread
|
||||||
<main/hepts.{byte,native}>: use_lablgtk, use_lablgtkthread, thread
|
<main/hepts.{byte,native}>: use_lablgtk, use_lablgtkthread, thread
|
||||||
|
|
|
@ -181,7 +181,8 @@ let node n =
|
||||||
n_equs = List.map translate_eq n.Heptagon.n_block.Heptagon.b_equs;
|
n_equs = List.map translate_eq n.Heptagon.n_block.Heptagon.b_equs;
|
||||||
n_loc = n.Heptagon.n_loc ;
|
n_loc = n.Heptagon.n_loc ;
|
||||||
n_params = n.Heptagon.n_params;
|
n_params = n.Heptagon.n_params;
|
||||||
n_params_constraints = n.Heptagon.n_params_constraints }
|
n_params_constraints = n.Heptagon.n_params_constraints;
|
||||||
|
n_mem_alloc = [] }
|
||||||
|
|
||||||
let typedec
|
let typedec
|
||||||
{Heptagon.t_name = n; Heptagon.t_desc = tdesc; Heptagon.t_loc = loc} =
|
{Heptagon.t_name = n; Heptagon.t_desc = tdesc; Heptagon.t_loc = loc} =
|
||||||
|
|
|
@ -114,6 +114,7 @@ let main () =
|
||||||
"-fti", Arg.Set full_type_info, doc_full_type_info;
|
"-fti", Arg.Set full_type_info, doc_full_type_info;
|
||||||
"-fname", Arg.Set full_name, doc_full_name;
|
"-fname", Arg.Set full_name, doc_full_name;
|
||||||
"-itfusion", Arg.Set do_iterator_fusion, doc_itfusion;
|
"-itfusion", Arg.Set do_iterator_fusion, doc_itfusion;
|
||||||
|
"-memalloc", Arg.Set do_mem_alloc, doc_memalloc;
|
||||||
]
|
]
|
||||||
compile errmsg;
|
compile errmsg;
|
||||||
with
|
with
|
||||||
|
|
|
@ -34,7 +34,10 @@ let compile_program p =
|
||||||
(* Scheduling *)
|
(* Scheduling *)
|
||||||
let p = pass "Scheduling" true Schedule.program p pp in
|
let p = pass "Scheduling" true Schedule.program p pp in
|
||||||
|
|
||||||
(* Normalize memories*)
|
(* Normalize memories*)
|
||||||
let p = pass "Normalize memories" true Normalize_mem.program p pp in
|
let p = pass "Normalize memories" true Normalize_mem.program p pp in
|
||||||
|
|
||||||
|
(* Memory allocation *)
|
||||||
|
let p = pass "memory allocation" !do_mem_alloc Interference.program p pp in
|
||||||
|
|
||||||
p
|
p
|
||||||
|
|
|
@ -10,7 +10,7 @@ let df = function
|
||||||
ocaml_lib ~extern:true ~dir:"+menhirLib" "menhirLib";
|
ocaml_lib ~extern:true ~dir:"+menhirLib" "menhirLib";
|
||||||
|
|
||||||
(* Tell ocamlbuild about the ocamlgraph library. *)
|
(* Tell ocamlbuild about the ocamlgraph library. *)
|
||||||
ocaml_lib ~extern:true ~dir:"+ocamlgraph" "ocamlgraph";
|
ocaml_lib ~extern:true ~dir:"+ocamlgraph" "graph";
|
||||||
|
|
||||||
(* Menhir does not come with menhirLib.cmxa so we have to manually by-pass
|
(* Menhir does not come with menhirLib.cmxa so we have to manually by-pass
|
||||||
OCamlbuild's built-in logic and add the needed menhirLib.cmxa. *)
|
OCamlbuild's built-in logic and add the needed menhirLib.cmxa. *)
|
||||||
|
|
|
@ -98,6 +98,8 @@ let do_iterator_fusion = ref false
|
||||||
|
|
||||||
let do_scalarize = ref false
|
let do_scalarize = ref false
|
||||||
|
|
||||||
|
let do_mem_alloc = ref false
|
||||||
|
|
||||||
let doc_verbose = "\t\t\tSet verbose mode"
|
let doc_verbose = "\t\t\tSet verbose mode"
|
||||||
and doc_version = "\t\tThe version of the compiler"
|
and doc_version = "\t\tThe version of the compiler"
|
||||||
and doc_print_types = "\t\t\tPrint types"
|
and doc_print_types = "\t\t\tPrint types"
|
||||||
|
@ -123,3 +125,4 @@ and doc_assert = "<node>\t\tInsert run-time assertions for boolean node <node>"
|
||||||
and doc_inline = "<node>\t\tInline node <node>"
|
and doc_inline = "<node>\t\tInline node <node>"
|
||||||
and doc_itfusion = "\t\tEnable iterator fusion."
|
and doc_itfusion = "\t\tEnable iterator fusion."
|
||||||
and doc_tomato = "\t\tEnable automata minimization."
|
and doc_tomato = "\t\tEnable automata minimization."
|
||||||
|
and doc_memalloc = "\t\tEnable memory allocation"
|
||||||
|
|
Loading…
Reference in a new issue