2010-06-18 14:00:58 +02:00
|
|
|
(**************************************************************************)
|
|
|
|
(* *)
|
|
|
|
(* Heptagon *)
|
|
|
|
(* *)
|
|
|
|
(* Author : Marc Pouzet *)
|
|
|
|
(* Organization : Demons, LRI, University of Paris-Sud, Orsay *)
|
|
|
|
(* *)
|
|
|
|
(**************************************************************************)
|
|
|
|
open Misc
|
2010-07-27 13:31:13 +02:00
|
|
|
open Location
|
2010-06-18 14:00:58 +02:00
|
|
|
open Compiler_utils
|
2010-09-15 09:38:52 +02:00
|
|
|
open Compiler_options
|
2010-06-18 14:00:58 +02:00
|
|
|
|
2010-07-27 13:31:13 +02:00
|
|
|
let pp p = if !verbose then Mls_printer.print stdout p
|
2010-11-23 17:13:33 +01:00
|
|
|
|
2011-01-07 17:16:50 +01:00
|
|
|
let compile_program p =
|
2010-06-18 14:00:58 +02:00
|
|
|
(* Clocking *)
|
2010-09-09 00:35:06 +02:00
|
|
|
let p = pass "Clocking" true Clocking.program p pp in
|
2010-06-18 14:00:58 +02:00
|
|
|
|
|
|
|
(* Check that the dataflow code is well initialized *)
|
2010-09-09 00:35:06 +02:00
|
|
|
(*let p = silent_pass "Initialization check" !init Init.program p in *)
|
2010-06-18 14:00:58 +02:00
|
|
|
|
2010-07-21 17:19:51 +02:00
|
|
|
(* Iterator fusion *)
|
2010-09-15 09:53:20 +02:00
|
|
|
let p = pass "Iterator fusion" !do_iterator_fusion Itfusion.program p pp in
|
2010-07-21 17:19:51 +02:00
|
|
|
|
2010-09-30 21:44:18 +02:00
|
|
|
(* Automata minimization *)
|
|
|
|
let p =
|
|
|
|
let call_tomato = !tomato or (List.length !tomato_nodes > 0) in
|
|
|
|
pass "Automata minimization" call_tomato Tomato.program p pp in
|
|
|
|
|
|
|
|
let p =
|
|
|
|
pass "Automata minimization checks" true Tomato.tomato_checks p pp in
|
|
|
|
|
2010-06-18 14:00:58 +02:00
|
|
|
(* Normalization to maximize opportunities *)
|
2010-09-09 00:35:06 +02:00
|
|
|
let p = pass "Normalization" true Normalize.program p pp in
|
2010-06-26 16:53:25 +02:00
|
|
|
|
2010-06-18 14:00:58 +02:00
|
|
|
(* Scheduling *)
|
2010-09-09 00:35:06 +02:00
|
|
|
let p = pass "Scheduling" true Schedule.program p pp in
|
2010-06-26 16:53:25 +02:00
|
|
|
|
|
|
|
p
|