diff --git a/compiler/main/heptc.ml b/compiler/main/heptc.ml index 155adac..0f96b9b 100644 --- a/compiler/main/heptc.ml +++ b/compiler/main/heptc.ml @@ -115,6 +115,7 @@ let main () = "-fname", Arg.Set full_name, doc_full_name; "-itfusion", Arg.Set do_iterator_fusion, doc_itfusion; "-memalloc", Arg.Set do_mem_alloc, doc_memalloc; + "-sch-interf", Arg.Set use_interf_scheduler, doc_interf_scheduler ] compile errmsg; with diff --git a/compiler/minils/main/mls_compiler.ml b/compiler/minils/main/mls_compiler.ml index 70b51cb..209bd10 100644 --- a/compiler/minils/main/mls_compiler.ml +++ b/compiler/minils/main/mls_compiler.ml @@ -32,7 +32,12 @@ let compile_program p = *) (* Scheduling *) - let p = pass "Scheduling" true Schedule.program p pp in + let p = + if !Compiler_options.use_interf_scheduler then + pass "Scheduling (with minimization of interferences)" true Schedule_interf.program p pp + else + pass "Scheduling" true Schedule.program p pp + in (* Normalize memories*) let p = pass "Normalize memories" true Normalize_mem.program p pp in diff --git a/compiler/utilities/global/compiler_options.ml b/compiler/utilities/global/compiler_options.ml index d2548c1..7148d8c 100644 --- a/compiler/utilities/global/compiler_options.ml +++ b/compiler/utilities/global/compiler_options.ml @@ -100,6 +100,8 @@ let do_scalarize = ref false let do_mem_alloc = ref false +let use_interf_scheduler = 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" @@ -126,3 +128,4 @@ 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" +and doc_interf_scheduler = "\t\tUse a scheduler that tries to minimise interferences"