Commit cc740857 authored by Léo Gourdin's avatar Léo Gourdin
Browse files

Adding a compiler option -fexpanse-rtlcond

parent cf935c40
...@@ -105,6 +105,7 @@ let option_fmadd = ref true ...@@ -105,6 +105,7 @@ let option_fmadd = ref true
let option_div_i32 = ref "stsud" let option_div_i32 = ref "stsud"
let option_div_i64 = ref "stsud" let option_div_i64 = ref "stsud"
let option_fcoalesce_mem = ref true let option_fcoalesce_mem = ref true
let option_fexpanse_rtlcond = ref true
let option_fforward_moves = ref false let option_fforward_moves = ref false
let option_fmove_loop_invariants = ref false let option_fmove_loop_invariants = ref false
let option_fnontrap_loads = ref true let option_fnontrap_loads = ref true
......
...@@ -444,6 +444,7 @@ let cmdline_actions = ...@@ -444,6 +444,7 @@ let cmdline_actions =
@ f_opt "madd" option_fmadd @ f_opt "madd" option_fmadd
@ f_opt "nontrap-loads" option_fnontrap_loads @ f_opt "nontrap-loads" option_fnontrap_loads
@ f_opt "coalesce-mem" option_fcoalesce_mem @ 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 "all-loads-nontrap" option_all_loads_nontrap
@ f_opt "forward-moves" option_fforward_moves @ f_opt "forward-moves" option_fforward_moves
(* Code generation options *) (* Code generation options *)
......
...@@ -284,7 +284,9 @@ let rec do_schedule code pm = function ...@@ -284,7 +284,9 @@ let rec do_schedule code pm = function
| [] -> (code, pm) | [] -> (code, pm)
| sb :: lsb -> | sb :: lsb ->
(*debug_flag := true;*) (*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;*) (*debug_flag := false;*)
(* Trick: instead of turning loads into non trap as needed.. (* Trick: instead of turning loads into non trap as needed..
* First, we turn them all into non-trap. * First, we turn them all into non-trap.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment