summaryrefslogtreecommitdiff
path: root/backend/CSEproof.v
diff options
context:
space:
mode:
authorGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2010-06-29 08:27:14 +0000
committerGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2010-06-29 08:27:14 +0000
commit9c7c84cc40eaacc1e2c13091165785cddecba5ad (patch)
tree65eafe51ad284d88fd5a949e1b2a54cd272f9f91 /backend/CSEproof.v
parentf4b416882955d9d91bca60f3eb35b95f4124a5be (diff)
Support for inlined built-ins.
AST: add ef_inline flag to external functions. Selection: recognize calls to inlined built-ins and inline them as Sbuiltin. CminorSel to Asm: added Sbuiltin/Ibuiltin instruction. PrintAsm: adapted expansion of builtins. C2Clight: adapted detection of builtins. Conventions: refactored in a machine-independent part (backend/Conventions) and a machine-dependent part (ARCH/SYS/Conventions1). git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1356 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'backend/CSEproof.v')
-rw-r--r--backend/CSEproof.v32
1 files changed, 19 insertions, 13 deletions
diff --git a/backend/CSEproof.v b/backend/CSEproof.v
index 445c1af..c5670e8 100644
--- a/backend/CSEproof.v
+++ b/backend/CSEproof.v
@@ -232,7 +232,7 @@ Proof.
apply wf_kill_loads; auto.
apply wf_empty_numbering.
apply wf_empty_numbering.
-(* apply wf_add_unknown; auto. *)
+ apply wf_add_unknown. apply wf_kill_loads; auto.
Qed.
(** As a consequence, the numberings computed by the static analysis
@@ -582,21 +582,16 @@ Proof.
Qed.
Lemma kill_load_satisfiable:
- forall n rs chunk addr v m',
- Mem.storev chunk m addr v = Some m' ->
+ forall n rs m',
numbering_satisfiable ge sp rs m n ->
numbering_satisfiable ge sp rs m' (kill_loads n).
Proof.
- intros. inversion H0. inversion H1.
- generalize (kill_load_eqs_incl n.(num_eqs)). intro.
+ intros. inv H. destruct H0. generalize (kill_load_eqs_incl n.(num_eqs)). intro.
exists x. split; intros.
- generalize (H2 _ _ (H4 _ H5)).
- generalize (kill_load_eqs_ops _ _ _ H5).
- destruct rh; simpl.
- intros. destruct addr; simpl in H; try discriminate.
- auto.
- tauto.
- apply H3. assumption.
+ generalize (H _ _ (H1 _ H2)).
+ generalize (kill_load_eqs_ops _ _ _ H2).
+ destruct rh; simpl; tauto.
+ apply H0. auto.
Qed.
(** Correctness of [reg_valnum]: if it returns a register [r],
@@ -902,7 +897,18 @@ Proof.
econstructor; split.
eapply exec_Itailcall; eauto.
apply sig_preserved.
- econstructor; eauto.
+ econstructor; eauto.
+
+ (* Ibuiltin *)
+ econstructor; split.
+ eapply exec_Ibuiltin; eauto.
+ eapply external_call_symbols_preserved; eauto.
+ exact symbols_preserved. exact varinfo_preserved.
+ econstructor; eauto.
+ eapply analysis_correct_1; eauto. simpl; auto.
+ unfold transfer; rewrite H.
+ apply add_unknown_satisfiable. apply wf_kill_loads. apply wf_analyze.
+ eapply kill_load_satisfiable; eauto.
(* Icond true *)
econstructor; split.