aboutsummaryrefslogtreecommitdiffstats
path: root/backend/Tailcallproof.v
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>2014-11-16 18:39:43 +0100
committerXavier Leroy <xavier.leroy@inria.fr>2014-11-16 18:39:43 +0100
commitbda5ee25ac991c38f5541a234936f1f6e2226072 (patch)
treec26b8de4fac8a9e747f73a08adf25707786619fd /backend/Tailcallproof.v
parentef4334c5b3984277a0844ba94f6b3945152e3637 (diff)
downloadcompcert-kvx-bda5ee25ac991c38f5541a234936f1f6e2226072.tar.gz
compcert-kvx-bda5ee25ac991c38f5541a234936f1f6e2226072.zip
Add flags to control individual optimization passes + flag -O0 for turning them off.
Diffstat (limited to 'backend/Tailcallproof.v')
-rw-r--r--backend/Tailcallproof.v10
1 files changed, 4 insertions, 6 deletions
diff --git a/backend/Tailcallproof.v b/backend/Tailcallproof.v
index 1965b18e..cc4ff55e 100644
--- a/backend/Tailcallproof.v
+++ b/backend/Tailcallproof.v
@@ -13,7 +13,6 @@
(** Recognition of tail calls: correctness proof *)
Require Import Coqlib.
-Require Import Compopts.
Require Import Maps.
Require Import AST.
Require Import Integers.
@@ -183,11 +182,10 @@ Lemma transf_instr_lookup:
exists i', (transf_function f).(fn_code)!pc = Some i' /\ transf_instr_spec f i i'.
Proof.
intros. unfold transf_function.
- destruct (zeq (fn_stacksize f) 0). destruct (eliminate_tailcalls tt).
+ destruct (zeq (fn_stacksize f) 0).
simpl. rewrite PTree.gmap. rewrite H. simpl.
exists (transf_instr f pc i); split. auto. apply transf_instr_charact; auto.
exists i; split. auto. constructor.
- exists i; split. auto. constructor.
Qed.
(** * Semantic properties of the code transformation *)
@@ -263,14 +261,14 @@ Lemma sig_preserved:
forall f, funsig (transf_fundef f) = funsig f.
Proof.
destruct f; auto. simpl. unfold transf_function.
- destruct (zeq (fn_stacksize f) 0 && eliminate_tailcalls tt); auto.
+ destruct (zeq (fn_stacksize f) 0); auto.
Qed.
Lemma stacksize_preserved:
forall f, fn_stacksize (transf_function f) = fn_stacksize f.
Proof.
unfold transf_function. intros.
- destruct (zeq (fn_stacksize f) 0 && eliminate_tailcalls tt); auto.
+ destruct (zeq (fn_stacksize f) 0); auto.
Qed.
Lemma find_function_translated:
@@ -556,7 +554,7 @@ Proof.
assert (fn_stacksize (transf_function f) = fn_stacksize f /\
fn_entrypoint (transf_function f) = fn_entrypoint f /\
fn_params (transf_function f) = fn_params f).
- unfold transf_function. destruct (zeq (fn_stacksize f) 0 && eliminate_tailcalls tt); auto.
+ unfold transf_function. destruct (zeq (fn_stacksize f) 0); auto.
destruct H0 as [EQ1 [EQ2 EQ3]].
left. econstructor; split.
simpl. eapply exec_function_internal; eauto. rewrite EQ1; eauto.