diff options
author | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2020-10-27 15:53:05 +0100 |
---|---|---|
committer | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2020-10-27 15:53:05 +0100 |
commit | bad9e770dd77304f6f1dddbfe9930d5b6897ae27 (patch) | |
tree | fe0ace5f57d4296022b984e786cda00582a3d405 /driver | |
parent | f59c540aa7cf85c89ee0cb07c20374c8ad76a46c (diff) | |
download | compcert-kvx-bad9e770dd77304f6f1dddbfe9930d5b6897ae27.tar.gz compcert-kvx-bad9e770dd77304f6f1dddbfe9930d5b6897ae27.zip |
new option for CSE3 (trivial ops)
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 9df58903..6c82ac62 100644 --- a/driver/Clflags.ml +++ b/driver/Clflags.ml @@ -27,11 +27,13 @@ let option_ftailcalls = ref true let option_fconstprop = ref true let option_fcse = ref true let option_fcse2 = ref false + let option_fcse3 = ref true let option_fcse3_alias_analysis = ref true let option_fcse3_across_calls = ref false let option_fcse3_across_merges = ref true let option_fcse3_glb = ref true +let option_fcse3_trivial_ops = ref false let option_fredundancy = ref true (** Options relative to superblock scheduling *) diff --git a/driver/Compopts.v b/driver/Compopts.v index 540e8922..0c90ee52 100644 --- a/driver/Compopts.v +++ b/driver/Compopts.v @@ -54,6 +54,9 @@ Parameter optim_CSE3_across_merges: unit -> bool. (** Flag -fcse3-glb *) 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 -fmove-loop-invariants. *) Parameter optim_move_loop_invariants: unit -> bool. diff --git a/driver/Driver.ml b/driver/Driver.ml index 12f50762..5d2c839f 100644 --- a/driver/Driver.ml +++ b/driver/Driver.ml @@ -202,6 +202,7 @@ Processing options: -fcse3-across-calls Propagate CSE3 information across function calls [off] -fcse3-across-merges Propagate CSE3 information across control-flow merges [on] -fcse3-glb Refine CSE3 information using greatest lower bounds [on] + -fcse3-trivial-ops Replace trivial operations as well using CSE3 [off] -fmove-loop-invariants Perform loop-invariant code motion [off] -fredundancy Perform redundancy elimination [on] -fpostpass Perform postpass scheduling (only for K1 architecture) [on] @@ -415,6 +416,7 @@ let cmdline_actions = @ f_opt "cse3-across-calls" option_fcse3_across_calls @ f_opt "cse3-across-merges" option_fcse3_across_merges @ f_opt "cse3-glb" option_fcse3_glb + @ f_opt "cse3-trivial-ops" option_fcse3_trivial_ops @ f_opt "move-loop-invariants" option_fmove_loop_invariants @ f_opt "redundancy" option_fredundancy @ f_opt "postpass" option_fpostpass |