diff --git a/compiler/_tags b/compiler/_tags index aee6f1e..e027f3b 100644 --- a/compiler/_tags +++ b/compiler/_tags @@ -3,8 +3,8 @@ : camlp4of, use_camlp4 <**/hept_parser.ml>: use_menhirLib <**/mls_parser.ml>: use_menhirLib -<**/*.{byte,native}>: use_unix, use_str, link_menhirLib, debug -true: use_menhir +<**/*.{byte,native}>: use_unix, use_str, link_menhirLib, link_graph, debug +true: use_menhir, use_graph
: use_lablgtk, thread
: use_lablgtk, use_lablgtkthread, thread diff --git a/compiler/main/hept2mls.ml b/compiler/main/hept2mls.ml index 984291a..6db53de 100644 --- a/compiler/main/hept2mls.ml +++ b/compiler/main/hept2mls.ml @@ -181,7 +181,8 @@ let node n = n_equs = List.map translate_eq n.Heptagon.n_block.Heptagon.b_equs; n_loc = n.Heptagon.n_loc ; 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 {Heptagon.t_name = n; Heptagon.t_desc = tdesc; Heptagon.t_loc = loc} = diff --git a/compiler/main/heptc.ml b/compiler/main/heptc.ml index a7f4951..155adac 100644 --- a/compiler/main/heptc.ml +++ b/compiler/main/heptc.ml @@ -114,6 +114,7 @@ let main () = "-fti", Arg.Set full_type_info, doc_full_type_info; "-fname", Arg.Set full_name, doc_full_name; "-itfusion", Arg.Set do_iterator_fusion, doc_itfusion; + "-memalloc", Arg.Set do_mem_alloc, doc_memalloc; ] compile errmsg; with diff --git a/compiler/minils/main/mls_compiler.ml b/compiler/minils/main/mls_compiler.ml index 8a42098..70b51cb 100644 --- a/compiler/minils/main/mls_compiler.ml +++ b/compiler/minils/main/mls_compiler.ml @@ -34,7 +34,10 @@ let compile_program p = (* Scheduling *) 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 + (* Memory allocation *) + let p = pass "memory allocation" !do_mem_alloc Interference.program p pp in + p diff --git a/compiler/myocamlbuild.ml b/compiler/myocamlbuild.ml index e8c34d2..846f2f7 100644 --- a/compiler/myocamlbuild.ml +++ b/compiler/myocamlbuild.ml @@ -10,7 +10,7 @@ let df = function ocaml_lib ~extern:true ~dir:"+menhirLib" "menhirLib"; (* 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 OCamlbuild's built-in logic and add the needed menhirLib.cmxa. *) diff --git a/compiler/utilities/global/compiler_options.ml b/compiler/utilities/global/compiler_options.ml index 61ff55d..d2548c1 100644 --- a/compiler/utilities/global/compiler_options.ml +++ b/compiler/utilities/global/compiler_options.ml @@ -98,6 +98,8 @@ let do_iterator_fusion = ref false let do_scalarize = ref false +let do_mem_alloc = ref false + let doc_verbose = "\t\t\tSet verbose mode" and doc_version = "\t\tThe version of the compiler" and doc_print_types = "\t\t\tPrint types" @@ -123,3 +125,4 @@ and doc_assert = "\t\tInsert run-time assertions for boolean node " and doc_inline = "\t\tInline node " and doc_itfusion = "\t\tEnable iterator fusion." and doc_tomato = "\t\tEnable automata minimization." +and doc_memalloc = "\t\tEnable memory allocation"