[PATCH] D131644: [clang][dataflow] Don't skip the entry block
Eric Li via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 10 22:03:28 PDT 2022
li.zhe.hua updated this revision to Diff 451721.
li.zhe.hua added a comment.
Fix commit message
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131644/new/
https://reviews.llvm.org/D131644
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
@@ -342,11 +342,8 @@
std::vector<llvm::Optional<TypeErasedDataflowAnalysisState>> BlockStates(
CFCtx.getCFG().size(), llvm::None);
- // The entry basic block doesn't contain statements so it can be skipped.
const CFGBlock &Entry = CFCtx.getCFG().getEntry();
- BlockStates[Entry.getBlockID()] = {Analysis.typeErasedInitialElement(),
- InitEnv};
- Worklist.enqueueSuccessors(&Entry);
+ Worklist.enqueueBlock(&Entry);
// Bugs in lattices and transfer functions can prevent the analysis from
// converging. To limit the damage (infinite loops) that these bugs can cause,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131644.451721.patch
Type: text/x-patch
Size: 905 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220811/9061dfb9/attachment.bin>
More information about the cfe-commits
mailing list