[PATCH] D128363: [clang][dataflow] Implement functionality for flow condition variable substitution.
weiyi via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 22 10:45:55 PDT 2022
wyt created this revision.
Herald added subscribers: martong, tschuett, xazax.hun.
Herald added a project: All.
wyt requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
This patch introduces `buildAndSubstituteFlowCondition` - given a flow condition token, this function returns the expression of constraints defining the flow condition, with values substituted where specified.
As an example:\
Say we have tokens `FC1`, `FC2`, `FC3`:
FlowConditionConstraints: {
FC1: C1,
FC2: C2,
FC3: (FC1 v FC2) ^ C3,
}
`buildAndSubstituteFlowCondition(FC3, /*Substitutions:*/{{C1 -> C1'}})`
returns a value corresponding to `(C1' v C2) ^ C3`.
Note:
This function returns the flow condition expressed directly as its constraints, which differs to how we currently represent the flow condition as a token bound to a set of constraints and dependencies. Making the representation consistent may be an option to consider in the future.
Depends On D128357 <https://reviews.llvm.org/D128357>
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D128363
Files:
clang/include/clang/Analysis/FlowSensitive/DataflowAnalysisContext.h
clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp
clang/unittests/Analysis/FlowSensitive/DataflowAnalysisContextTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128363.439092.patch
Type: text/x-patch
Size: 8115 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220622/a220ea55/attachment.bin>
More information about the cfe-commits
mailing list