summaryrefslogtreecommitdiff
path: root/backend/Locations.v
diff options
context:
space:
mode:
authorGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2010-09-02 12:42:19 +0000
committerGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2010-09-02 12:42:19 +0000
commit265fa07b34a813ba9d8249ddad82d71e6002c10d (patch)
tree45831b1793c7920b10969fc7cf6316c202d78e91 /backend/Locations.v
parent94470fb6a652cb993982269fcb7a0e8319b54488 (diff)
Merge of the reuse-temps branch:
- Reload temporaries are marked as destroyed (set to Vundef) across operations in the semantics of LTL, LTLin, Linear and Mach, allowing Asmgen to reuse them. - Added IA32 port. - Cleaned up float conversions and axiomatization of floats. git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1499 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'backend/Locations.v')
-rw-r--r--backend/Locations.v23
1 files changed, 23 insertions, 0 deletions
diff --git a/backend/Locations.v b/backend/Locations.v
index c2fda9c..1270e1d 100644
--- a/backend/Locations.v
+++ b/backend/Locations.v
@@ -423,4 +423,27 @@ Module Locmap.
auto.
Qed.
+ Fixpoint undef (ll: list loc) (m: t) {struct ll} : t :=
+ match ll with
+ | nil => m
+ | l1 :: ll' => undef ll' (set l1 Vundef m)
+ end.
+
+ Lemma guo: forall ll l m, Loc.notin l ll -> (undef ll m) l = m l.
+ Proof.
+ induction ll; simpl; intros. auto.
+ destruct H. rewrite IHll; auto. apply gso. apply Loc.diff_sym; auto.
+ Qed.
+
+ Lemma gus: forall ll l m, In l ll -> (undef ll m) l = Vundef.
+ Proof.
+ assert (P: forall ll l m, m l = Vundef -> (undef ll m) l = Vundef).
+ induction ll; simpl; intros. auto. apply IHll.
+ unfold set. destruct (Loc.eq a l); auto.
+ destruct (Loc.overlap a l); auto.
+ induction ll; simpl; intros. contradiction.
+ destruct H. apply P. subst a. apply gss.
+ auto.
+ Qed.
+
End Locmap.