From dd345b4fd33a9e59507029f30da9a09d5e450db6 Mon Sep 17 00:00:00 2001 From: Cyril SIX Date: Fri, 13 Mar 2020 14:13:16 +0100 Subject: Added prediction info in the printers --- backend/PrintRTL.ml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'backend/PrintRTL.ml') diff --git a/backend/PrintRTL.ml b/backend/PrintRTL.ml index 5eab9901..b2ef05ca 100644 --- a/backend/PrintRTL.ml +++ b/backend/PrintRTL.ml @@ -75,10 +75,11 @@ let print_instruction pp (pc, i) = (name_of_external ef) (print_builtin_args reg) args; print_succ pp s (pc - 1) - | Icond(cond, args, s1, s2, _) -> - fprintf pp "if (%a) goto %d else goto %d\n" + | Icond(cond, args, s1, s2, info) -> + fprintf pp "if (%a) goto %d else goto %d (prediction: %s)\n" (PrintOp.print_condition reg) (cond, args) (P.to_int s1) (P.to_int s2) + (match info with None -> "none" | Some true -> "branch" | Some false -> "fallthrough") | Ijumptable(arg, tbl) -> let tbl = Array.of_list tbl in fprintf pp "jumptable (%a)\n" reg arg; -- cgit