Skip to content

[clang][dataflow] Drop block-relative cap on worklist iterations. #80033

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -540,14 +540,6 @@ runTypeErasedDataflowAnalysis(
Worklist.enqueueSuccessors(&Entry);

AnalysisContext AC(CFCtx, Analysis, StartingEnv, BlockStates);

// FIXME: remove relative cap. There isn't really any good setting for
// `MaxAverageVisitsPerBlock`, so it has no clear value over using
// `MaxBlockVisits` directly.
static constexpr std::int32_t MaxAverageVisitsPerBlock = 4;
const std::int32_t RelativeMaxBlockVisits =
MaxAverageVisitsPerBlock * BlockStates.size();
MaxBlockVisits = std::min(RelativeMaxBlockVisits, MaxBlockVisits);
std::int32_t BlockVisits = 0;
while (const CFGBlock *Block = Worklist.dequeue()) {
LLVM_DEBUG(llvm::dbgs()
Expand Down