aboutsummaryrefslogtreecommitdiffstats
path: root/backend/CSE3analysis.v
diff options
context:
space:
mode:
authorDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2020-11-26 16:24:01 +0100
committerDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2020-11-26 16:24:01 +0100
commit3c670f954dc470333e94932279e02e6940ff9f15 (patch)
tree2cbe571ba6e62d3517551ff18d8fb0ce44591cfe /backend/CSE3analysis.v
parent01f0108df437df0792ac560f630e7969be76b60b (diff)
downloadcompcert-kvx-3c670f954dc470333e94932279e02e6940ff9f15.tar.gz
compcert-kvx-3c670f954dc470333e94932279e02e6940ff9f15.zip
is_condition_present_sound
Diffstat (limited to 'backend/CSE3analysis.v')
-rw-r--r--backend/CSE3analysis.v7
1 files changed, 6 insertions, 1 deletions
diff --git a/backend/CSE3analysis.v b/backend/CSE3analysis.v
index 4b616568..390f6d26 100644
--- a/backend/CSE3analysis.v
+++ b/backend/CSE3analysis.v
@@ -290,6 +290,12 @@ Section OPERATIONS.
| None => None
end.
+ Definition is_condition_present
+ (rel : RELATION.t) (cond : condition) (args : list reg) :=
+ match eq_find (Cond cond args) with
+ | Some id => PSet.contains rel id
+ | None => false
+ end.
Definition rhs_find (sop : sym_op) (args : list reg) (rel : RELATION.t) : option reg :=
match pick_source (PSet.elements (PSet.inter (eq_rhs_oracle ctx no sop args) rel)) with
@@ -509,7 +515,6 @@ Definition internal_analysis
(f : RTL.function) : option invariants := DS.fixpoint
(RTL.fn_code f) RTL.successors_instr
(apply_instr' tenv (RTL.fn_code f)) (RTL.fn_entrypoint f) (Some RELATION.top).
-
End OPERATIONS.
Record analysis_hints :=