From 0b076ef6eb5553be43ce81c27e438f632b17cb32 Mon Sep 17 00:00:00 2001 From: Léo Gourdin Date: Tue, 27 Jul 2021 11:22:30 +0200 Subject: prepass act --- scheduling/BTLScheduleraux.ml | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'scheduling') diff --git a/scheduling/BTLScheduleraux.ml b/scheduling/BTLScheduleraux.ml index 6a114b74..9c8f6ab5 100644 --- a/scheduling/BTLScheduleraux.ml +++ b/scheduling/BTLScheduleraux.ml @@ -37,18 +37,20 @@ let apply_schedule bseq olast positions = build_iblock ibl let schedule_blk n ibf btl = - let bseq, olast = flatten_blk_basics ibf in - match schedule_sequence bseq btl with - | Some positions -> - debug "%d," (p2i n); - Array.iter (fun p -> debug "%d " p) positions; - debug "\n"; - let new_ib = apply_schedule bseq olast positions in - let new_ibf = - { entry = new_ib; binfo = ibf.binfo; input_regs = ibf.input_regs } - in - PTree.set n new_ibf btl - | None -> btl + if not !Clflags.option_fprepass then btl + else + let bseq, olast = flatten_blk_basics ibf in + match schedule_sequence bseq btl with + | Some positions -> + debug "%d," (p2i n); + Array.iter (fun p -> debug "%d " p) positions; + debug "\n"; + let new_ib = apply_schedule bseq olast positions in + let new_ibf = + { entry = new_ib; binfo = ibf.binfo; input_regs = ibf.input_regs } + in + PTree.set n new_ibf btl + | None -> btl let rec do_schedule btl = function | [] -> btl -- cgit