[llvm] bf76e64 - [BPI] Push exit block rather than exiting ones in getSccExitBlocks
Bin Cheng via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 10 22:22:40 PST 2021
Author: Bin Cheng
Date: 2021-11-11T14:22:19+08:00
New Revision: bf76e648543114050acf346750f9db664a8550f4
URL: https://github.com/llvm/llvm-project/commit/bf76e648543114050acf346750f9db664a8550f4
DIFF: https://github.com/llvm/llvm-project/commit/bf76e648543114050acf346750f9db664a8550f4.diff
LOG: [BPI] Push exit block rather than exiting ones in getSccExitBlocks
The function BranchProbabilityInfo::SccInfo::getSccExitBlocks is
supposed to collect all exit blocks for SCC rather than all exiting
blocks. This patch fixes the typo.
Reviewed By: ebrevnov
Differential Revision: https://reviews.llvm.org/D113344
Added:
Modified:
llvm/lib/Analysis/BranchProbabilityInfo.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Analysis/BranchProbabilityInfo.cpp b/llvm/lib/Analysis/BranchProbabilityInfo.cpp
index aa6b93fe3f07c..33fdc8b628c59 100644
--- a/llvm/lib/Analysis/BranchProbabilityInfo.cpp
+++ b/llvm/lib/Analysis/BranchProbabilityInfo.cpp
@@ -190,7 +190,7 @@ void BranchProbabilityInfo::SccInfo::getSccExitBlocks(
if (isSCCExitingBlock(BB, SccNum))
for (const auto *Succ : successors(BB))
if (getSCCNum(Succ) != SccNum)
- Exits.push_back(const_cast<BasicBlock *>(BB));
+ Exits.push_back(const_cast<BasicBlock *>(Succ));
}
}
More information about the llvm-commits
mailing list