aboutsummaryrefslogtreecommitdiffstats
path: root/test/monniaux/PostpassSchedulingOracle.patch
diff options
context:
space:
mode:
authorCyril SIX <cyril.six@kalray.eu>2019-06-19 11:50:31 +0200
committerCyril SIX <cyril.six@kalray.eu>2019-06-19 11:52:10 +0200
commite4e4bb635650055a94112250b71c111096f1263e (patch)
tree3b0ead3d3bdc5eb9b5b97da2b592b2079fe6ac59 /test/monniaux/PostpassSchedulingOracle.patch
parent7da5e4590233ef631074e0aeacfc9e7810a00f1d (diff)
downloadcompcert-kvx-e4e4bb635650055a94112250b71c111096f1263e.tar.gz
compcert-kvx-e4e4bb635650055a94112250b71c111096f1263e.zip
Makefile in test/monniaux that generates the compilation time graphs
Diffstat (limited to 'test/monniaux/PostpassSchedulingOracle.patch')
-rw-r--r--test/monniaux/PostpassSchedulingOracle.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/monniaux/PostpassSchedulingOracle.patch b/test/monniaux/PostpassSchedulingOracle.patch
new file mode 100644
index 00000000..71c44350
--- /dev/null
+++ b/test/monniaux/PostpassSchedulingOracle.patch
@@ -0,0 +1,33 @@
+diff --git a/mppa_k1c/PostpassSchedulingOracle.ml b/mppa_k1c/PostpassSchedulingOracle.ml
+index 2fc561e..d3748e8 100644
+--- a/mppa_k1c/PostpassSchedulingOracle.ml
++++ b/mppa_k1c/PostpassSchedulingOracle.ml
+@@ -829,7 +829,7 @@ let print_bb oc bb =
+ let asm_instructions = Asm.unfold_bblock bb
+ in List.iter (print_inst oc) asm_instructions
+
+-let do_schedule bb =
++let real_do_schedule bb =
+ let problem = build_problem bb
+ in let solution = (if !Clflags.option_fpostpass_sched = "ilp" then
+ validated_scheduler cascaded_scheduler
+@@ -850,6 +850,19 @@ let do_schedule bb =
+ end;
+ bundles)
+
++let do_schedule bb =
++ let nb_instructions = Camlcoq.Z.to_int64 @@ Asmvliw.size bb
++ in let start_time = (Gc.major(); (Unix.times ()).Unix.tms_utime)
++ in let sched = real_do_schedule bb
++ in let refer = ref sched
++ in begin
++ for i = 1 to 100-1 do
++ refer := (if i > 0 then real_do_schedule bb else real_do_schedule bb);
++ done;
++ Printf.printf "%Ld: %f\n" nb_instructions ((Unix.times ()).Unix.tms_utime -. start_time);
++ sched
++ end
++
+ (**
+ * Dumb schedule if the above doesn't work
+ *)