From bc6129876ffc6f0323752908f5de12bb5c5a7c74 Mon Sep 17 00:00:00 2001 From: Léo Gourdin Date: Thu, 20 May 2021 17:28:55 +0200 Subject: working oracles (no renumber for now) --- scheduling/PrintBTL.ml | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'scheduling/PrintBTL.ml') diff --git a/scheduling/PrintBTL.ml b/scheduling/PrintBTL.ml index 23ad91f6..0ed3981d 100644 --- a/scheduling/PrintBTL.ml +++ b/scheduling/PrintBTL.ml @@ -2,10 +2,10 @@ open Printf open Camlcoq open Datatypes open Maps -open AST open BTL open PrintAST open BTLaux +open DebugPrint (* Printing of BTL code *) @@ -97,15 +97,18 @@ let rec print_iblock pp is_rec pref ib = let print_btl_inst pp ib = print_iblock pp false " " ib let print_btl_code pp btl is_rec = - fprintf pp "\n"; - List.iter - (fun (n, ibf) -> - fprintf pp "[BTL block %d]\n" (P.to_int n); - print_iblock pp is_rec " " ibf.entry; - fprintf pp "\n") - (PTree.elements btl); - fprintf pp "\n" + if !debug_flag then ( + fprintf pp "\n"; + List.iter + (fun (n, ibf) -> + fprintf pp "[BTL block %d]\n" (P.to_int n); + print_iblock pp is_rec " " ibf.entry; + fprintf pp "\n") + (PTree.elements btl); + fprintf pp "\n") + else () +(* TODO gourdinl remove or adapt this? let print_function pp id f = fprintf pp "%s(%a) {\n" (extern_atom id) regs f.fn_params; let instrs = List.map (fun (n, i) -> i.entry) (PTree.elements f.fn_code) in @@ -116,4 +119,4 @@ let print_globdef pp (id, gd) = match gd with Gfun (Internal f) -> print_function pp id f | _ -> () let print_program pp (prog : BTL.program) = - List.iter (print_globdef pp) prog.prog_defs + List.iter (print_globdef pp) prog.prog_defs*) -- cgit