Skip to content

Commit a385c37

Browse files
authored
[clang][dataflow] Drop block-relative cap on worklist iterations. (#80033)
As per the FIXME, this cap never really served its purpose. This patch simplifies to a single, caller-specified, absolute cap.
1 parent aa88a09 commit a385c37

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -540,14 +540,6 @@ runTypeErasedDataflowAnalysis(
540540
Worklist.enqueueSuccessors(&Entry);
541541

542542
AnalysisContext AC(CFCtx, Analysis, StartingEnv, BlockStates);
543-
544-
// FIXME: remove relative cap. There isn't really any good setting for
545-
// `MaxAverageVisitsPerBlock`, so it has no clear value over using
546-
// `MaxBlockVisits` directly.
547-
static constexpr std::int32_t MaxAverageVisitsPerBlock = 4;
548-
const std::int32_t RelativeMaxBlockVisits =
549-
MaxAverageVisitsPerBlock * BlockStates.size();
550-
MaxBlockVisits = std::min(RelativeMaxBlockVisits, MaxBlockVisits);
551543
std::int32_t BlockVisits = 0;
552544
while (const CFGBlock *Block = Worklist.dequeue()) {
553545
LLVM_DEBUG(llvm::dbgs()

0 commit comments

Comments
 (0)