Added memalloc pass to the compiler

This commit is contained in:
Cédric Pasteur 2011-04-20 15:47:05 +02:00 committed by Cédric Pasteur
parent 1059329c0e
commit 9a7f9254d2
6 changed files with 13 additions and 5 deletions

View file

@ -3,8 +3,8 @@
<preproc.ml>: 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
<main/hepts.ml>: use_lablgtk, thread
<main/hepts.{byte,native}>: use_lablgtk, use_lablgtkthread, thread

View file

@ -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} =

View file

@ -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

View file

@ -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

View file

@ -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. *)

View file

@ -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 = "<node>\t\tInsert run-time assertions for boolean node <node>"
and doc_inline = "<node>\t\tInline node <node>"
and doc_itfusion = "\t\tEnable iterator fusion."
and doc_tomato = "\t\tEnable automata minimization."
and doc_memalloc = "\t\tEnable memory allocation"