aboutsummaryrefslogtreecommitdiffstats
path: root/driver
diff options
context:
space:
mode:
authorDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2020-10-27 15:53:38 +0100
committerDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2020-10-27 15:53:38 +0100
commit21af08182a41cd6a2fe1d2da08bedb572ab88981 (patch)
tree08220395866aa7308c159de854e8098d0a4bfa90 /driver
parent19c81a709d42467d57031ca275159a83568ca042 (diff)
parentbad9e770dd77304f6f1dddbfe9930d5b6897ae27 (diff)
downloadcompcert-kvx-21af08182a41cd6a2fe1d2da08bedb572ab88981.tar.gz
compcert-kvx-21af08182a41cd6a2fe1d2da08bedb572ab88981.zip
Merge remote-tracking branch 'origin/kvx-work' into kvx-test-prepass
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 e9b0dade..206bbb00 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 62e586f0..b93bf688 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]
-mtune= Type of CPU (for scheduling on some architectures)
@@ -419,6 +420,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
@ [ Exact "-mtune", String (fun s -> option_mtune := s) ]