[PATCH] D156903: [FuncSpec] Estimate dead blocks more accurately.
Chuanqi Xu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 2 19:34:29 PDT 2023
ChuanqiXu added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/FunctionSpecialization.cpp:109-117
+static bool canEliminateSuccessor(BasicBlock *DeadBB, BasicBlock *SuccBB,
+ DenseSet<BasicBlock *> &DeadBlocks) {
+ unsigned I = 0;
+ return all_of(predecessors(SuccBB),
+ [&I, DeadBB, SuccBB, &DeadBlocks] (BasicBlock *PredBB) {
+ return I++ < MaxBlockPredecessors &&
+ (PredBB == DeadBB || PredBB == SuccBB || DeadBlocks.contains(PredBB));
----------------
My instinct reaction to the function is "doesn't DeadBlocks contain DeadBB"?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156903/new/
https://reviews.llvm.org/D156903
More information about the llvm-commits
mailing list