diff options
author | Léo Gourdin <leo.gourdin@univ-grenoble-alpes.fr> | 2021-05-20 17:28:55 +0200 |
---|---|---|
committer | Léo Gourdin <leo.gourdin@univ-grenoble-alpes.fr> | 2021-05-20 17:28:55 +0200 |
commit | bc6129876ffc6f0323752908f5de12bb5c5a7c74 (patch) | |
tree | 84e2b19cb4a47bd5810b9c74ea9d6a740339bee4 /scheduling/PrintBTL.ml | |
parent | 2408dd1aecf8d8c3bfd3b24a65f7f57cf602cb10 (diff) | |
download | compcert-kvx-bc6129876ffc6f0323752908f5de12bb5c5a7c74.tar.gz compcert-kvx-bc6129876ffc6f0323752908f5de12bb5c5a7c74.zip |
working oracles (no renumber for now)
Diffstat (limited to 'scheduling/PrintBTL.ml')
-rw-r--r-- | scheduling/PrintBTL.ml | 23 |
1 files changed, 13 insertions, 10 deletions
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*) |