aboutsummaryrefslogtreecommitdiffstats
path: root/backend/Duplicateaux.ml
diff options
context:
space:
mode:
authorCyril SIX <cyril.six@kalray.eu>2019-12-16 16:03:12 +0100
committerCyril SIX <cyril.six@kalray.eu>2019-12-16 16:03:12 +0100
commit26775340b173fd631e850f0a553ddab25c934fbc (patch)
tree8c952f60bc6cd750c44c340e2d7e2a938040e3cc /backend/Duplicateaux.ml
parente11a1b3ccac5cb60472ad507a71b0600ac3b5f8f (diff)
downloadcompcert-kvx-26775340b173fd631e850f0a553ddab25c934fbc.tar.gz
compcert-kvx-26775340b173fd631e850f0a553ddab25c934fbc.zip
Stub for opcode heuristic
Diffstat (limited to 'backend/Duplicateaux.ml')
-rw-r--r--backend/Duplicateaux.ml6
1 files changed, 2 insertions, 4 deletions
diff --git a/backend/Duplicateaux.ml b/backend/Duplicateaux.ml
index 71f44776..1fecd0d9 100644
--- a/backend/Duplicateaux.ml
+++ b/backend/Duplicateaux.ml
@@ -211,9 +211,7 @@ let do_call_heuristic code ifso ifnot is_loop_header preferred =
(preferred := true; raise HeuristicSucceeded)
else ()
-let do_opcode_heuristic code cond ifso ifnot is_loop_header preferred = ()
- (* TODO - the condition is architecture dependent, so each archi should
- have a heuristic function in its folder *)
+let do_opcode_heuristic code cond ifso ifnot preferred = DuplicateOpcodeHeuristic.opcode_heuristic code cond ifso ifnot preferred
let do_return_heuristic code ifso ifnot is_loop_header preferred =
let predicate n = (function
@@ -257,7 +255,7 @@ let get_directions code entrypoint =
let preferred = ref false
in (try
do_call_heuristic code ifso ifnot is_loop_header preferred;
- do_opcode_heuristic code cond ifso ifnot is_loop_header preferred;
+ do_opcode_heuristic code cond ifso ifnot preferred;
do_return_heuristic code ifso ifnot is_loop_header preferred;
do_store_heuristic code ifso ifnot is_loop_header preferred;
do_loop_heuristic code ifso ifnot is_loop_header preferred;