Skip to content
Snippets Groups Projects
Commit 0fe569d2 authored by David Monniaux's avatar David Monniaux
Browse files

disable debug printing in scheduler

parent 1eaa5dad
No related branches found
No related tags found
No related merge requests found
...@@ -447,10 +447,12 @@ let schedule_sequence (seqa : (instruction*Regset.t) array) = ...@@ -447,10 +447,12 @@ let schedule_sequence (seqa : (instruction*Regset.t) array) =
else else
begin begin
let nr_instructions = Array.length seqa in let nr_instructions = Array.length seqa in
Printf.printf "prepass scheduling length = %d\n" (Array.length seqa); (if !Clflags.option_debug_compcert > 6
then Printf.printf "prepass scheduling length = %d\n" (Array.length seqa));
let problem = define_problem opweights seqa in let problem = define_problem opweights seqa in
print_sequence stdout (Array.map fst seqa); (if !Clflags.option_debug_compcert > 7
print_problem stdout problem; then (print_sequence stdout (Array.map fst seqa);
print_problem stdout problem));
match prepass_scheduler_by_name match prepass_scheduler_by_name
(!Clflags.option_fprepass_sched) (!Clflags.option_fprepass_sched)
problem problem
......
...@@ -110,11 +110,11 @@ let schedule_superblock sb code = ...@@ -110,11 +110,11 @@ let schedule_superblock sb code =
if not !Clflags.option_fprepass if not !Clflags.option_fprepass
then sb.instructions then sb.instructions
else else
let old_flag = !debug_flag in (* let old_flag = !debug_flag in
debug_flag := true; debug_flag := true;
print_endline "ORIGINAL SUPERBLOCK"; print_endline "ORIGINAL SUPERBLOCK";
print_superblock sb code; print_superblock sb code;
debug_flag := old_flag; debug_flag := old_flag; *)
let nr_instr = Array.length sb.instructions in let nr_instr = Array.length sb.instructions in
let trailer_length = let trailer_length =
match PTree.get (sb.instructions.(nr_instr-1)) code with match PTree.get (sb.instructions.(nr_instr-1)) code with
...@@ -138,11 +138,11 @@ let schedule_superblock sb code = ...@@ -138,11 +138,11 @@ let schedule_superblock sb code =
Array.append Array.append
(Array.map (fun i -> sb.instructions.(i)) order) (Array.map (fun i -> sb.instructions.(i)) order)
(Array.sub sb.instructions (nr_instr-trailer_length) trailer_length) in (Array.sub sb.instructions (nr_instr-trailer_length) trailer_length) in
Printf.printf "REORDERED SUPERBLOCK %d\n" (Array.length ins'); (* Printf.printf "REORDERED SUPERBLOCK %d\n" (Array.length ins');
debug_flag := true; debug_flag := true;
print_instructions (Array.to_list ins') code; print_instructions (Array.to_list ins') code;
debug_flag := old_flag; debug_flag := old_flag;
flush stdout; flush stdout; *)
assert ((Array.length sb.instructions) = (Array.length ins')); assert ((Array.length sb.instructions) = (Array.length ins'));
(*sb.instructions; *) (*sb.instructions; *)
ins';; ins';;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment