From dd299de4b51c561b3a2d8e9f388396381b0e2b85 Mon Sep 17 00:00:00 2001 From: Léo Gourdin Date: Mon, 30 Nov 2020 16:45:33 +0100 Subject: add option in scheduler to record bb size --- aarch64/PostpassSchedulingOracle.ml | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'aarch64/PostpassSchedulingOracle.ml') diff --git a/aarch64/PostpassSchedulingOracle.ml b/aarch64/PostpassSchedulingOracle.ml index fbcdb55d..8d930255 100644 --- a/aarch64/PostpassSchedulingOracle.ml +++ b/aarch64/PostpassSchedulingOracle.ml @@ -18,6 +18,7 @@ open OpWeightsAsm open InstructionScheduler let debug = false +let stats = false (** * Extracting infos from Asm instructions @@ -649,6 +650,10 @@ let bblock_schedule bb = if debug && not identity_mode then ( Printf.eprintf "###############################\n"; Printf.eprintf "SCHEDULING\n" ); + if stats then ( + let oc = open_out_gen [Open_append; Open_creat] 0o666 "oracle_stats.csv" in + Printf.fprintf oc "%d\n" (Camlcoq.Z.to_int (size bb)); + close_out oc); if identity_mode then pack_result bb else smart_schedule bb (** Called schedule function from Coq *) -- cgit