aboutsummaryrefslogtreecommitdiffstats
path: root/scheduling/InstructionScheduler.ml
diff options
context:
space:
mode:
Diffstat (limited to 'scheduling/InstructionScheduler.ml')
-rw-r--r--scheduling/InstructionScheduler.ml19
1 files changed, 11 insertions, 8 deletions
diff --git a/scheduling/InstructionScheduler.ml b/scheduling/InstructionScheduler.ml
index 3e82336b..9c5c674d 100644
--- a/scheduling/InstructionScheduler.ml
+++ b/scheduling/InstructionScheduler.ml
@@ -349,13 +349,14 @@ let _ = fun x -> priority_list_scheduler INSTRUCTION_ORDER x;;
(* A scheduler sensitive to register pressure *)
let reg_pres_scheduler (problem : problem) : solution option =
- DebugPrint.debug_flag := true;
+ (* DebugPrint.debug_flag := true; *)
let nr_instructions = get_nr_instructions problem in
- (* if !Clflags.option_debug_compcert > 6 then *)
- DebugPrint.debug "\nSCHEDULING_SUPERBLOCK %d\n" nr_instructions;
-
+ if !Clflags.option_debug_compcert > 6 then
+ (Printf.eprintf "\nSCHEDULING_SUPERBLOCK %d\n" nr_instructions;
+ flush stderr);
+
let successors = get_successors problem
and predecessors = get_predecessors problem
and times = Array.make (nr_instructions+1) (-1) in
@@ -524,7 +525,8 @@ let reg_pres_scheduler (problem : problem) : solution option =
then result := ins
) ready;
if !result <> -1 then
- vector_subtract usages.(!result) current_resources)
+ vector_subtract usages.(!result) current_resources;
+ incr cnt)
else
(incr cnt)
);
@@ -550,7 +552,8 @@ let reg_pres_scheduler (problem : problem) : solution option =
| i -> (assert(times.(i) < 0);
(DebugPrint.debug "INSTR ISSUED: %d\n" i;
if !csr_b && !Clflags.option_debug_compcert > 6 then
- DebugPrint.debug "REGPRES: high pres class %d\n" i;
+ (Printf.eprintf "REGPRES: high pres class %d\n" i;
+ flush stderr);
csr_b := false;
(* if !Clflags.option_regpres_wait_window then *)
cnt := 0;
@@ -601,11 +604,11 @@ let reg_pres_scheduler (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;
+ (* DebugPrint.debug_flag := false; *)
Some times
with Exit ->
DebugPrint.debug "reg_pres_sched failed\n";
- DebugPrint.debug_flag := false;
+ (* DebugPrint.debug_flag := false; *)
None
;;