aboutsummaryrefslogtreecommitdiffstats
path: root/backend
diff options
context:
space:
mode:
authorCyril SIX <cyril.six@kalray.eu>2021-04-28 12:34:44 +0200
committerCyril SIX <cyril.six@kalray.eu>2021-04-28 12:34:44 +0200
commit9faa0b9eb03e37facaf77366d703bb20f4af9461 (patch)
treedeb7150e5c0d880a6f253377efa05508899f3352 /backend
parent95f33ccc672e38bca21f91bfe298283ccb43cdf4 (diff)
downloadcompcert-kvx-9faa0b9eb03e37facaf77366d703bb20f4af9461.tar.gz
compcert-kvx-9faa0b9eb03e37facaf77366d703bb20f4af9461.zip
Heuristic counter update
Diffstat (limited to 'backend')
-rw-r--r--backend/Duplicateaux.ml18
1 files changed, 6 insertions, 12 deletions
diff --git a/backend/Duplicateaux.ml b/backend/Duplicateaux.ml
index d55da64a..425947ce 100644
--- a/backend/Duplicateaux.ml
+++ b/backend/Duplicateaux.ml
@@ -48,13 +48,11 @@ let stats_nb_overpredict = ref 0
let wrong_opcode = ref 0
let wrong_return = ref 0
let wrong_loop2 = ref 0
-let wrong_loop = ref 0
let wrong_call = ref 0
let right_opcode = ref 0
let right_return = ref 0
let right_loop2 = ref 0
-let right_loop = ref 0
let right_call = ref 0
let reset_stats () = begin
@@ -66,12 +64,10 @@ let reset_stats () = begin
wrong_opcode := 0;
wrong_return := 0;
wrong_loop2 := 0;
- wrong_loop := 0;
wrong_call := 0;
right_opcode := 0;
right_return := 0;
right_loop2 := 0;
- right_loop := 0;
right_call := 0;
end
@@ -85,11 +81,11 @@ let write_stats_oc () =
match !stats_oc with
| None -> ()
| Some oc -> begin
- Printf.fprintf oc "%d %d %d %d %d %d %d %d %d %d %d %d %d %d %d\n" !stats_nb_total
+ Printf.fprintf oc "%d %d %d %d %d %d %d %d %d %d %d %d %d\n" !stats_nb_total
!stats_nb_correct_predicts !stats_nb_mispredicts !stats_nb_missed_opportunities
!stats_nb_overpredict
- !wrong_opcode !wrong_return !wrong_loop2 !wrong_loop !wrong_call
- !right_opcode !right_return !right_loop2 !right_loop !right_call
+ !wrong_opcode !wrong_return !wrong_loop2 !wrong_call
+ !right_opcode !right_return !right_loop2 !right_call
;
close_out oc
end
@@ -417,7 +413,7 @@ let get_directions f code entrypoint = begin
if stats_oc_recording () || not @@ has_some pred then
(* debug "Analyzing %d.." (P.to_int n); *)
let heuristics = [ do_opcode_heuristic;
- do_return_heuristic; do_loop2_heuristic loop_info n; do_loop_heuristic; do_call_heuristic;
+ do_return_heuristic; do_loop2_heuristic loop_info n; (* do_loop_heuristic; *) do_call_heuristic;
(* do_store_heuristic *) ] in
let preferred = ref None in
let current_heuristic = ref 0 in
@@ -438,8 +434,7 @@ let get_directions f code entrypoint = begin
| 0 -> incr wrong_opcode
| 1 -> incr wrong_return
| 2 -> incr wrong_loop2
- | 3 -> incr wrong_loop
- | 4 -> incr wrong_call
+ | 3 -> incr wrong_call
| _ -> failwith "Shouldn't happen"
end
| Some false, Some false
@@ -448,8 +443,7 @@ let get_directions f code entrypoint = begin
| 0 -> incr right_opcode
| 1 -> incr right_return
| 2 -> incr right_loop2
- | 3 -> incr right_loop
- | 4 -> incr right_call
+ | 3 -> incr right_call
| _ -> failwith "Shouldn't happen"
end
| _ -> ()