aboutsummaryrefslogtreecommitdiffstats
path: root/driver
diff options
context:
space:
mode:
authorCyril SIX <cyril.six@kalray.eu>2020-10-27 16:05:18 +0100
committerCyril SIX <cyril.six@kalray.eu>2020-10-27 16:05:18 +0100
commit7b880f545e6b808f09285fc84e432141e2be206d (patch)
tree815b4068f0999cc2b109199127e63e5fbda3b918 /driver
parentf82bf792fdf0c03b5c76f4cef5c39d5f1fd32b81 (diff)
parentbad9e770dd77304f6f1dddbfe9930d5b6897ae27 (diff)
downloadcompcert-kvx-7b880f545e6b808f09285fc84e432141e2be206d.tar.gz
compcert-kvx-7b880f545e6b808f09285fc84e432141e2be206d.zip
Merge branch 'kvx-work' into duplicate-param
Diffstat (limited to 'driver')
-rw-r--r--driver/Clflags.ml2
-rw-r--r--driver/Compopts.v3
-rw-r--r--driver/Driver.ml2
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