[llvm] [PseudoProbe] Add an option to remove pseudo probes after profile annotation (PR #90293)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 26 16:12:21 PDT 2024
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 8cf0f9ab2f32114afd615def833f66ebeeede7d5 acf5f3ecd631a16bc2f6f0ce5aa11d31aa3bc4bf -- llvm/lib/Transforms/IPO/SampleProfile.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Transforms/IPO/SampleProfile.cpp b/llvm/lib/Transforms/IPO/SampleProfile.cpp
index 4b92b993ee..a64788ee56 100644
--- a/llvm/lib/Transforms/IPO/SampleProfile.cpp
+++ b/llvm/lib/Transforms/IPO/SampleProfile.cpp
@@ -2130,17 +2130,17 @@ bool SampleProfileLoader::rejectHighStalenessProfile(
}
void SampleProfileLoader::removePseudoProbeInsts(Module &M) {
- for (Function &F : M) {
- std::vector<Instruction *> InstsToDel;
- for (auto &BB : F) {
- for (auto &I : BB) {
- if (isa<PseudoProbeInst>(&I))
- InstsToDel.push_back(&I);
- }
+ for (Function &F : M) {
+ std::vector<Instruction *> InstsToDel;
+ for (auto &BB : F) {
+ for (auto &I : BB) {
+ if (isa<PseudoProbeInst>(&I))
+ InstsToDel.push_back(&I);
}
- for (auto *I : InstsToDel)
- I->eraseFromParent();
}
+ for (auto *I : InstsToDel)
+ I->eraseFromParent();
+ }
}
bool SampleProfileLoader::runOnModule(Module &M, ModuleAnalysisManager *AM,
``````````
</details>
https://github.com/llvm/llvm-project/pull/90293
More information about the llvm-commits
mailing list