From cc740857ade958df35a488a3c1d9bffac974a9db Mon Sep 17 00:00:00 2001 From: Léo Gourdin Date: Tue, 16 Feb 2021 12:44:34 +0100 Subject: Adding a compiler option -fexpanse-rtlcond --- driver/Clflags.ml | 1 + driver/Driver.ml | 1 + scheduling/RTLpathScheduleraux.ml | 4 +++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/driver/Clflags.ml b/driver/Clflags.ml index 9b7b5c4d..4cff3f28 100644 --- a/driver/Clflags.ml +++ b/driver/Clflags.ml @@ -105,6 +105,7 @@ let option_fmadd = ref true let option_div_i32 = ref "stsud" let option_div_i64 = ref "stsud" let option_fcoalesce_mem = ref true +let option_fexpanse_rtlcond = ref true let option_fforward_moves = ref false let option_fmove_loop_invariants = ref false let option_fnontrap_loads = ref true diff --git a/driver/Driver.ml b/driver/Driver.ml index c9eacadc..0c5d9cb4 100644 --- a/driver/Driver.ml +++ b/driver/Driver.ml @@ -444,6 +444,7 @@ let cmdline_actions = @ f_opt "madd" option_fmadd @ f_opt "nontrap-loads" option_fnontrap_loads @ f_opt "coalesce-mem" option_fcoalesce_mem + @ f_opt "expanse-rtlcond" option_fexpanse_rtlcond @ f_opt "all-loads-nontrap" option_all_loads_nontrap @ f_opt "forward-moves" option_fforward_moves (* Code generation options *) diff --git a/scheduling/RTLpathScheduleraux.ml b/scheduling/RTLpathScheduleraux.ml index 5e4999db..79959ef2 100644 --- a/scheduling/RTLpathScheduleraux.ml +++ b/scheduling/RTLpathScheduleraux.ml @@ -284,7 +284,9 @@ let rec do_schedule code pm = function | [] -> (code, pm) | sb :: lsb -> (*debug_flag := true;*) - let (code_exp, pm) = expanse sb code pm in + let (code_exp, pm) = + if !Clflags.option_fexpanse_rtlcond then (expanse sb code pm) + else (code, pm) in (*debug_flag := false;*) (* Trick: instead of turning loads into non trap as needed.. * First, we turn them all into non-trap. -- cgit