diff options
Diffstat (limited to 'backend')
-rw-r--r-- | backend/DuplicateOpcodeHeuristic.mli | 2 | ||||
-rw-r--r-- | backend/Duplicateaux.ml | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/backend/DuplicateOpcodeHeuristic.mli b/backend/DuplicateOpcodeHeuristic.mli index a4cc4848..b4c9f1ef 100644 --- a/backend/DuplicateOpcodeHeuristic.mli +++ b/backend/DuplicateOpcodeHeuristic.mli @@ -3,6 +3,8 @@ * when selecting a trace. *) +exception HeuristicSucceeded + (* The bool reference should be updated to [true] if the condition is supposed * to hold, [false] if it is supposed to not hold * The function should raise HeuristicSucceeded if it succeeded to predict a branch, diff --git a/backend/Duplicateaux.ml b/backend/Duplicateaux.ml index 1fecd0d9..a987d73f 100644 --- a/backend/Duplicateaux.ml +++ b/backend/Duplicateaux.ml @@ -261,7 +261,7 @@ let get_directions code entrypoint = do_loop_heuristic code ifso ifnot is_loop_header preferred; Printf.printf "Random choice for %d\n" (P.to_int n); preferred := Random.bool () - with HeuristicSucceeded -> () + with HeuristicSucceeded | DuplicateOpcodeHeuristic.HeuristicSucceeded -> () ); directions := PTree.set n !preferred !directions | _ -> () ) bfs_order; |