aboutsummaryrefslogtreecommitdiffstats
path: root/driver
diff options
context:
space:
mode:
authorDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2020-04-01 13:30:30 +0200
committerDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2020-04-01 13:30:30 +0200
commitd0590cab5ee32df395c129ee3edfa2dc3aaa202d (patch)
tree7bb94eb9b032861cc3b8f20661d11e61ccf9c5d8 /driver
parent25da4f1a90457c592cd8594666cd4d1d9628a8b1 (diff)
downloadcompcert-kvx-d0590cab5ee32df395c129ee3edfa2dc3aaa202d.tar.gz
compcert-kvx-d0590cab5ee32df395c129ee3edfa2dc3aaa202d.zip
begin adapting for LICM phase
Diffstat (limited to 'driver')
-rw-r--r--driver/Clflags.ml1
-rw-r--r--driver/Compopts.v3
-rw-r--r--driver/Driver.ml2
3 files changed, 6 insertions, 0 deletions
diff --git a/driver/Clflags.ml b/driver/Clflags.ml
index ff2647a7..ae96e820 100644
--- a/driver/Clflags.ml
+++ b/driver/Clflags.ml
@@ -82,5 +82,6 @@ let option_fxsaddr = ref true
let option_faddx = ref false
let option_fcoalesce_mem = ref true
let option_fforward_moves = ref true
+let option_fmove_loop_invariants = ref false
let option_all_loads_nontrap = ref false
let option_inline_auto_threshold = ref 0
diff --git a/driver/Compopts.v b/driver/Compopts.v
index a3181da8..e4dae87d 100644
--- a/driver/Compopts.v
+++ b/driver/Compopts.v
@@ -48,6 +48,9 @@ Parameter optim_CSE3: unit -> bool.
(** Flag -fcse3-alias-analysis. For DMonniaux's common subexpression elimination. *)
Parameter optim_CSE3_alias_analysis: unit -> bool.
+(** Flag -fmove-loop-invariants. *)
+Parameter optim_move_loop_invariants: unit -> bool.
+
(** Flag -fredundancy. For dead code elimination. *)
Parameter optim_redundancy: unit -> bool.
diff --git a/driver/Driver.ml b/driver/Driver.ml
index b167dbd1..0f9e637c 100644
--- a/driver/Driver.ml
+++ b/driver/Driver.ml
@@ -199,6 +199,7 @@ Processing options:
-fcse2 Perform inter-loop common subexpression elimination [off]
-fcse3 Perform inter-loop common subexpression elimination [on]
-fcse3-alias-analysis Perform inter-loop common subexpression elimination with alias analysis [on]
+ -fmove-loop-invariants Perform loop-invariant code motion [off]
-fredundancy Perform redundancy elimination [on]
-fpostpass Perform postpass scheduling (only for K1 architecture) [on]
-fpostpass= <optim> Perform postpass scheduling with the specified optimization [list]
@@ -401,6 +402,7 @@ let cmdline_actions =
@ f_opt "cse2" option_fcse2
@ f_opt "cse3" option_fcse3
@ f_opt "cse3-alias-analysis" option_fcse3_alias_analysis
+ @ f_opt "move-loop-invariants" option_fmove_loop_invariants
@ f_opt "redundancy" option_fredundancy
@ f_opt "postpass" option_fpostpass
@ [ Exact "-fduplicate", Integer (fun n -> option_fduplicate := n) ]