diff options
author | Léo Gourdin <leo.gourdin@univ-grenoble-alpes.fr> | 2021-09-01 16:09:17 +0200 |
---|---|---|
committer | Léo Gourdin <leo.gourdin@univ-grenoble-alpes.fr> | 2021-09-01 16:09:17 +0200 |
commit | c620afbf97a3f6b299bcf2cc14edafa0120a4bc2 (patch) | |
tree | 7fc69fbc5ea765c9cb1f7864e2bfe0f0758d6831 /scheduling | |
parent | 269208723faff37e6f6539b71101515b17a8a36f (diff) | |
parent | 74901c6df6ceb92da58ef5db2592fc05561dce01 (diff) | |
download | compcert-kvx-c620afbf97a3f6b299bcf2cc14edafa0120a4bc2.tar.gz compcert-kvx-c620afbf97a3f6b299bcf2cc14edafa0120a4bc2.zip |
Merge remote-tracking branch 'origin/kvx-work' into kvx-work
Diffstat (limited to 'scheduling')
-rw-r--r-- | scheduling/InstructionScheduler.ml | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/scheduling/InstructionScheduler.ml b/scheduling/InstructionScheduler.ml index e3a421a5..4c9bde64 100644 --- a/scheduling/InstructionScheduler.ml +++ b/scheduling/InstructionScheduler.ml @@ -519,13 +519,15 @@ let reg_pres_scheduler (problem : problem) : solution option = if not !Clflags.option_regpres_wait_window then (InstrSet.iter (fun ins -> - if vector_less_equal usages.(ins) current_resources && - List.fold_left (fold_delta i) 0 mentions.(maybe) >= 0 - then result := ins + if vector_less_equal usages.(ins) current_resources + && List.fold_left (fold_delta i) 0 mentions.(maybe) >= 0 + then (result := ins; + vector_subtract usages.(!result) current_resources; + raise Exit) ) ready; if !result <> -1 then - vector_subtract usages.(!result) current_resources; - incr cnt) + vector_subtract usages.(!result) current_resources + else incr cnt) else (incr cnt) ); @@ -606,6 +608,7 @@ let reg_pres_scheduler (problem : problem) : solution option = (* DebugPrint.debug_flag := false; *) Some times with Exit -> + (* DebugPrint.debug_flag := true; *) DebugPrint.debug "reg_pres_sched failed\n"; (* DebugPrint.debug_flag := false; *) None @@ -616,7 +619,8 @@ let reg_pres_scheduler (problem : problem) : solution option = (********************************************************************) let reg_pres_scheduler_bis (problem : problem) : solution option = - (* Printf.printf "\nNEW\n\n"; *) + (* DebugPrint.debug_flag := true; *) + DebugPrint.debug "\nNEW\n\n"; let nr_instructions = get_nr_instructions problem in let successors = get_successors problem and predecessors = get_predecessors problem @@ -801,9 +805,11 @@ let reg_pres_scheduler_bis (problem : problem) : solution option = if target_time > !final_time then final_time := target_time) predecessors.(nr_instructions); times.(nr_instructions) <- !final_time; + (* DebugPrint.debug_flag := false; *) Some times with Exit -> DebugPrint.debug "reg_pres_sched failed\n"; + (* DebugPrint.debug_flag := false; *) None ;; |