aboutsummaryrefslogtreecommitdiffstats
path: root/driver
diff options
context:
space:
mode:
authorDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2020-04-01 12:41:52 +0200
committerDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2020-04-01 12:41:52 +0200
commit55b06bcf438180ea78060e5fd4a3522286df7fa0 (patch)
treeb69cef9e508666a582a68c2ba7ab7e52b343d3dc /driver
parent787c5a53503e838d7f604d0a20b62de6988cd488 (diff)
parentc34e25a208e092aff0b7dfa931b199df0ce3bc52 (diff)
downloadcompcert-kvx-55b06bcf438180ea78060e5fd4a3522286df7fa0.tar.gz
compcert-kvx-55b06bcf438180ea78060e5fd4a3522286df7fa0.zip
Merge remote-tracking branch 'origin/mppa-work' into mppa-cse3
Diffstat (limited to 'driver')
-rw-r--r--driver/Compiler.v10
-rw-r--r--driver/Compopts.v3
2 files changed, 6 insertions, 7 deletions
diff --git a/driver/Compiler.v b/driver/Compiler.v
index 47fb8236..3dbd35ce 100644
--- a/driver/Compiler.v
+++ b/driver/Compiler.v
@@ -136,7 +136,7 @@ Definition transf_rtl_program (f: RTL.program) : res Asm.program :=
@@ print (print_RTL 2)
@@ time "Renumbering" Renumber.transf_program
@@ print (print_RTL 3)
- @@@ time "Tail-duplicating" Duplicate.transf_program
+ @@@ partial_if Compopts.optim_duplicate (time "Tail-duplicating" Duplicate.transf_program)
@@ print (print_RTL 4)
@@ total_if Compopts.optim_constprop (time "Constant propagation" Constprop.transf_program)
@@ print (print_RTL 5)
@@ -258,7 +258,7 @@ Definition CompCert's_passes :=
::: mkpass (match_if Compopts.optim_tailcalls Tailcallproof.match_prog)
::: mkpass Inliningproof.match_prog
::: mkpass Renumberproof.match_prog
- ::: mkpass Duplicateproof.match_prog
+ ::: mkpass (match_if Compopts.optim_duplicate Duplicateproof.match_prog)
::: mkpass (match_if Compopts.optim_constprop Constpropproof.match_prog)
::: mkpass (match_if Compopts.optim_constprop Renumberproof.match_prog)
::: mkpass (match_if Compopts.optim_CSE CSEproof.match_prog)
@@ -306,7 +306,7 @@ Proof.
set (p7 := total_if optim_tailcalls Tailcall.transf_program p6) in *.
destruct (Inlining.transf_program p7) as [p8|e] eqn:P8; simpl in T; try discriminate.
set (p9 := Renumber.transf_program p8) in *.
- destruct (Duplicate.transf_program p9) as [p10|e] eqn:P10; simpl in T; try discriminate.
+ destruct (partial_if optim_duplicate Duplicate.transf_program p9) as [p10|e] eqn:P10; simpl in T; try discriminate.
set (p11 := total_if optim_constprop Constprop.transf_program p10) in *.
set (p12 := total_if optim_constprop Renumber.transf_program p11) in *.
destruct (partial_if optim_CSE CSE.transf_program p12) as [p13|e] eqn:P13; simpl in T; try discriminate.
@@ -332,7 +332,7 @@ Proof.
exists p7; split. apply total_if_match. apply Tailcallproof.transf_program_match.
exists p8; split. apply Inliningproof.transf_program_match; auto.
exists p9; split. apply Renumberproof.transf_program_match; auto.
- exists p10; split. apply Duplicateproof.transf_program_match; auto.
+ exists p10; split. eapply partial_if_match; eauto. apply Duplicateproof.transf_program_match; auto.
exists p11; split. apply total_if_match. apply Constpropproof.transf_program_match.
exists p12; split. apply total_if_match. apply Renumberproof.transf_program_match.
exists p13; split. eapply partial_if_match; eauto. apply CSEproof.transf_program_match.
@@ -419,7 +419,7 @@ Ltac DestructM :=
eapply Inliningproof.transf_program_correct; eassumption.
eapply compose_forward_simulations. eapply Renumberproof.transf_program_correct; eassumption.
eapply compose_forward_simulations.
- eapply Duplicateproof.transf_program_correct; eassumption.
+ eapply match_if_simulation. eassumption. exact Duplicateproof.transf_program_correct.
eapply compose_forward_simulations.
eapply match_if_simulation. eassumption. exact Constpropproof.transf_program_correct.
eapply compose_forward_simulations.
diff --git a/driver/Compopts.v b/driver/Compopts.v
index f1ab4f7b..a3181da8 100644
--- a/driver/Compopts.v
+++ b/driver/Compopts.v
@@ -27,8 +27,7 @@ Parameter generate_float_constants: unit -> bool.
(** For value analysis. Currently always false. *)
Parameter va_strict: unit -> bool.
-(** Flag -fduplicate. For tail duplication optimization. Necessary to have
- * bigger superblocks *)
+(** Flag -fduplicate. Branch prediction annotation + tail duplication *)
Parameter optim_duplicate: unit -> bool.
(** Flag -ftailcalls. For tail call optimization. *)