[PATCH] D121694: [clang][dataflow] Allow disabling built-in transfer functions for CFG terminators
Yitzhak Mandelbaum via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 15 08:11:38 PDT 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG4633c02eb001: [clang][dataflow] Allow disabling built-in transfer functions for CFG… (authored by ymandel).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D121694/new/
https://reviews.llvm.org/D121694
Files:
clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp
Index: clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp
===================================================================
--- clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp
+++ clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp
@@ -170,6 +170,8 @@
}
llvm::Optional<TypeErasedDataflowAnalysisState> MaybeState;
+ bool ApplyBuiltinTransfer = Analysis.applyBuiltinTransfer();
+
for (const CFGBlock *Pred : Preds) {
// Skip if the `Block` is unreachable or control flow cannot get past it.
if (!Pred || Pred->hasNoReturnElement())
@@ -183,11 +185,13 @@
continue;
TypeErasedDataflowAnalysisState PredState = MaybePredState.getValue();
- if (const Stmt *PredTerminatorStmt = Pred->getTerminatorStmt()) {
- const StmtToEnvMapImpl StmtToEnv(CFCtx, BlockStates);
- TerminatorVisitor(StmtToEnv, PredState.Env,
- blockIndexInPredecessor(*Pred, Block))
- .Visit(PredTerminatorStmt);
+ if (ApplyBuiltinTransfer) {
+ if (const Stmt *PredTerminatorStmt = Pred->getTerminatorStmt()) {
+ const StmtToEnvMapImpl StmtToEnv(CFCtx, BlockStates);
+ TerminatorVisitor(StmtToEnv, PredState.Env,
+ blockIndexInPredecessor(*Pred, Block))
+ .Visit(PredTerminatorStmt);
+ }
}
if (MaybeState.hasValue()) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D121694.415445.patch
Type: text/x-patch
Size: 1380 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220315/eef78372/attachment.bin>
More information about the cfe-commits
mailing list