From 0fe569d24b99a34fb3b9ad6c0cb86876cc86a31d Mon Sep 17 00:00:00 2001 From: David Monniaux <david.monniaux@univ-grenoble-alpes.fr> Date: Wed, 4 Nov 2020 09:10:00 +0100 Subject: [PATCH] disable debug printing in scheduler --- aarch64/PrepassSchedulingOracle.ml | 8 +++++--- scheduling/RTLpathScheduleraux.ml | 8 ++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/aarch64/PrepassSchedulingOracle.ml b/aarch64/PrepassSchedulingOracle.ml index 358ee97bb..2c3eb14fb 100644 --- a/aarch64/PrepassSchedulingOracle.ml +++ b/aarch64/PrepassSchedulingOracle.ml @@ -447,10 +447,12 @@ let schedule_sequence (seqa : (instruction*Regset.t) array) = else begin 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 - print_sequence stdout (Array.map fst seqa); - print_problem stdout problem; + (if !Clflags.option_debug_compcert > 7 + then (print_sequence stdout (Array.map fst seqa); + print_problem stdout problem)); match prepass_scheduler_by_name (!Clflags.option_fprepass_sched) problem diff --git a/scheduling/RTLpathScheduleraux.ml b/scheduling/RTLpathScheduleraux.ml index 88f777a5d..66910bdfe 100644 --- a/scheduling/RTLpathScheduleraux.ml +++ b/scheduling/RTLpathScheduleraux.ml @@ -110,11 +110,11 @@ let schedule_superblock sb code = if not !Clflags.option_fprepass then sb.instructions else - let old_flag = !debug_flag in + (* let old_flag = !debug_flag in debug_flag := true; print_endline "ORIGINAL SUPERBLOCK"; print_superblock sb code; - debug_flag := old_flag; + debug_flag := old_flag; *) let nr_instr = Array.length sb.instructions in let trailer_length = match PTree.get (sb.instructions.(nr_instr-1)) code with @@ -138,11 +138,11 @@ let schedule_superblock sb code = Array.append (Array.map (fun i -> sb.instructions.(i)) order) (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; print_instructions (Array.to_list ins') code; debug_flag := old_flag; - flush stdout; + flush stdout; *) assert ((Array.length sb.instructions) = (Array.length ins')); (*sb.instructions; *) ins';; -- GitLab