[llvm] BranchProbabilityInfo: Report branch_weights 1, 0 for invoke (PR #72947)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 20 19:15:06 PST 2023
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 0d77978e75a6e287e4c74fe5763227712ce3e3ac 9957bf4b042b3e8e5485edadaf07f8d5ee580368 -- llvm/include/llvm/Analysis/BranchProbabilityInfo.h llvm/lib/Analysis/BranchProbabilityInfo.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Analysis/BranchProbabilityInfo.cpp b/llvm/lib/Analysis/BranchProbabilityInfo.cpp
index 06beacc41d..4818ced94d 100644
--- a/llvm/lib/Analysis/BranchProbabilityInfo.cpp
+++ b/llvm/lib/Analysis/BranchProbabilityInfo.cpp
@@ -876,8 +876,8 @@ bool BranchProbabilityInfo::calcFixedWeights(const BasicBlock *BB) {
assert(Invoke->getNormalDest() == Invoke->getSuccessor(0) &&
Invoke->getUnwindDest() == Invoke->getSuccessor(1) &&
"unexpected successor ordering");
- SmallVector<BranchProbability, 2> EdgeProbs({
- BranchProbability::getOne(), BranchProbability::getZero()});
+ SmallVector<BranchProbability, 2> EdgeProbs(
+ {BranchProbability::getOne(), BranchProbability::getZero()});
setEdgeProbability(BB, EdgeProbs);
return true;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/72947
More information about the llvm-commits
mailing list