diff options
author | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2020-12-09 13:15:53 +0100 |
---|---|---|
committer | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2020-12-09 13:15:53 +0100 |
commit | 0a13bf127bb385df424bd9e392742d4fc5bef86a (patch) | |
tree | e01a0c87bc5225934604cb1d3a786b7c02b6243f /driver | |
parent | f01d490fad2fbf7fb7a2e0861075ca6c09976ec4 (diff) | |
download | compcert-kvx-0a13bf127bb385df424bd9e392742d4fc5bef86a.tar.gz compcert-kvx-0a13bf127bb385df424bd9e392742d4fc5bef86a.zip |
begin implementing -fcse3-conditions
Diffstat (limited to 'driver')
-rw-r--r-- | driver/Clflags.ml | 2 | ||||
-rw-r--r-- | driver/Compopts.v | 3 | ||||
-rw-r--r-- | driver/Driver.ml | 2 |
3 files changed, 7 insertions, 0 deletions
diff --git a/driver/Clflags.ml b/driver/Clflags.ml index 991720bf..55d1bb1c 100644 --- a/driver/Clflags.ml +++ b/driver/Clflags.ml @@ -35,6 +35,8 @@ let option_fcse3_across_merges = ref true let option_fcse3_glb = ref true let option_fcse3_trivial_ops = ref false let option_fcse3_refine = ref true +let option_fcse3_conditions = ref true + let option_fredundancy = ref true (** Options relative to superblock scheduling *) diff --git a/driver/Compopts.v b/driver/Compopts.v index 0c90ee52..65264124 100644 --- a/driver/Compopts.v +++ b/driver/Compopts.v @@ -57,6 +57,9 @@ Parameter optim_CSE3_glb: unit -> bool. (** Flag -fcse3-trivial-ops. For DMonniaux's common subexpression elimination, simplify trivial operations as well. *) Parameter optim_CSE3_trivial_ops: unit -> bool. +(** Flag -fcse3-conditions. For DMonniaux's common subexpression elimination: remove redundant conditional branches. *) +Parameter optim_CSE3_conditions: unit -> bool. + (** Flag -fmove-loop-invariants. *) Parameter optim_move_loop_invariants: unit -> bool. diff --git a/driver/Driver.ml b/driver/Driver.ml index 089cd423..38028806 100644 --- a/driver/Driver.ml +++ b/driver/Driver.ml @@ -204,6 +204,7 @@ Processing options: -fcse3-glb Refine CSE3 information using greatest lower bounds [on] -fcse3-trivial-ops Replace trivial operations as well using CSE3 [off] -fcse3-refine Refine CSE3 invariants by descending iteration [on] + -fcse3-conditions Remove redundant conditions using CSE3 [on] -fmove-loop-invariants Perform loop-invariant code motion [off] -fredundancy Perform redundancy elimination [on] -mtune= Type of CPU (for scheduling on some architectures) @@ -418,6 +419,7 @@ let cmdline_actions = @ f_opt "cse3-glb" option_fcse3_glb @ f_opt "cse3-trivial-ops" option_fcse3_trivial_ops @ f_opt "cse3-refine" option_fcse3_refine + @ f_opt "cse3-conditions" option_fcse3_conditions @ f_opt "move-loop-invariants" option_fmove_loop_invariants @ f_opt "redundancy" option_fredundancy @ [ Exact "-mtune", String (fun s -> option_mtune := s) ] |