[llvm] [PGO] Add ProfileInjector and ProfileVerifier passes (PR #147388)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 23 10:05:51 PDT 2025
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 HEAD~1 HEAD --extensions h,cpp -- llvm/include/llvm/Transforms/Utils/ProfileVerify.h llvm/lib/Transforms/Utils/ProfileVerify.cpp llvm/lib/Passes/PassBuilder.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Transforms/Utils/ProfileVerify.cpp b/llvm/lib/Transforms/Utils/ProfileVerify.cpp
index 4b2ab8086..b972132eb 100644
--- a/llvm/lib/Transforms/Utils/ProfileVerify.cpp
+++ b/llvm/lib/Transforms/Utils/ProfileVerify.cpp
@@ -85,9 +85,7 @@ bool ProfileInjector::inject() {
(void)FirstZeroDenominator;
assert(FirstZeroDenominator == Probs.end());
const auto *FirstNonZeroNumerator =
- find_if(Probs, [](const BranchProbability &P) {
- return !P.isZero();
- });
+ find_if(Probs, [](const BranchProbability &P) { return !P.isZero(); });
assert(FirstNonZeroNumerator != Probs.end());
DynamicAPInt LCM(Probs[0].getDenominator());
DynamicAPInt GCD(FirstNonZeroNumerator->getNumerator());
``````````
</details>
https://github.com/llvm/llvm-project/pull/147388
More information about the llvm-commits
mailing list