[llvm] 7e1dc7e - [nfc] Rename API with typo in BranchProbabilityInfo (#146447)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 2 08:54:05 PDT 2025
Author: Mircea Trofin
Date: 2025-07-02T08:54:03-07:00
New Revision: 7e1dc7e8d4b7a4ad376223bea6f2a557114178f5
URL: https://github.com/llvm/llvm-project/commit/7e1dc7e8d4b7a4ad376223bea6f2a557114178f5
DIFF: https://github.com/llvm/llvm-project/commit/7e1dc7e8d4b7a4ad376223bea6f2a557114178f5.diff
LOG: [nfc] Rename API with typo in BranchProbabilityInfo (#146447)
Added:
Modified:
llvm/include/llvm/Analysis/BranchProbabilityInfo.h
llvm/lib/Analysis/BranchProbabilityInfo.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/Analysis/BranchProbabilityInfo.h b/llvm/include/llvm/Analysis/BranchProbabilityInfo.h
index 83a92c5eb39a3..cf57f2c95b55b 100644
--- a/llvm/include/llvm/Analysis/BranchProbabilityInfo.h
+++ b/llvm/include/llvm/Analysis/BranchProbabilityInfo.h
@@ -411,8 +411,8 @@ class BranchProbabilityInfo {
std::optional<uint32_t> getInitialEstimatedBlockWeight(const BasicBlock *BB);
// Computes estimated weights for all blocks in \p F.
- void computeEestimateBlockWeight(const Function &F, DominatorTree *DT,
- PostDominatorTree *PDT);
+ void estimateBlockWeights(const Function &F, DominatorTree *DT,
+ PostDominatorTree *PDT);
/// Based on computed weights by \p computeEstimatedBlockWeight set
/// probabilities on branches.
diff --git a/llvm/lib/Analysis/BranchProbabilityInfo.cpp b/llvm/lib/Analysis/BranchProbabilityInfo.cpp
index 0ff16dbec24e0..671e023415a6e 100644
--- a/llvm/lib/Analysis/BranchProbabilityInfo.cpp
+++ b/llvm/lib/Analysis/BranchProbabilityInfo.cpp
@@ -798,8 +798,9 @@ BranchProbabilityInfo::getInitialEstimatedBlockWeight(const BasicBlock *BB) {
// Does RPO traversal over all blocks in \p F and assigns weights to
// 'unreachable', 'noreturn', 'cold', 'unwind' blocks. In addition it does its
// best to propagate the weight to up/down the IR.
-void BranchProbabilityInfo::computeEestimateBlockWeight(
- const Function &F, DominatorTree *DT, PostDominatorTree *PDT) {
+void BranchProbabilityInfo::estimateBlockWeights(const Function &F,
+ DominatorTree *DT,
+ PostDominatorTree *PDT) {
SmallVector<BasicBlock *, 8> BlockWorkList;
SmallVector<LoopBlock, 8> LoopWorkList;
SmallDenseMap<LoopData, SmallVector<BasicBlock *, 4>> LoopExitBlocks;
@@ -1244,7 +1245,7 @@ void BranchProbabilityInfo::calculate(const Function &F, const LoopInfo &LoopI,
PDT = PDTPtr.get();
}
- computeEestimateBlockWeight(F, DT, PDT);
+ estimateBlockWeights(F, DT, PDT);
// Walk the basic blocks in post-order so that we can build up state about
// the successors of a block iteratively.
More information about the llvm-commits
mailing list