[llvm] [SizeOpts] Remove dead struct BasicBlockBFIAdapter (NFC) (PR #222536)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 10 01:06:23 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-transforms
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
The last uses were removed on June 28, 2023 in commit
80155cbf0be1744953edf68b9729c24bd0de79c4 when hotness/coldness queries
were refactored into templated ProfileSummaryInfo member functions.
Assisted-by: Antigravity
---
Full diff: https://github.com/llvm/llvm-project/pull/222536.diff
1 Files Affected:
- (modified) llvm/lib/Transforms/Utils/SizeOpts.cpp (-38)
``````````diff
diff --git a/llvm/lib/Transforms/Utils/SizeOpts.cpp b/llvm/lib/Transforms/Utils/SizeOpts.cpp
index 7c95e7e6b996b..db5f0f1fab506 100644
--- a/llvm/lib/Transforms/Utils/SizeOpts.cpp
+++ b/llvm/lib/Transforms/Utils/SizeOpts.cpp
@@ -58,44 +58,6 @@ cl::opt<int> llvm::PgsoCutoffSampleProf(
cl::desc("The profile guided size optimization profile summary cutoff "
"for sample profile."));
-namespace {
-struct BasicBlockBFIAdapter {
- static bool isFunctionColdInCallGraph(const Function *F,
- ProfileSummaryInfo *PSI,
- BlockFrequencyInfo &BFI) {
- return PSI->isFunctionColdInCallGraph(F, BFI);
- }
- static bool isFunctionHotInCallGraphNthPercentile(int CutOff,
- const Function *F,
- ProfileSummaryInfo *PSI,
- BlockFrequencyInfo &BFI) {
- return PSI->isFunctionHotInCallGraphNthPercentile(CutOff, F, BFI);
- }
- static bool isFunctionColdInCallGraphNthPercentile(int CutOff,
- const Function *F,
- ProfileSummaryInfo *PSI,
- BlockFrequencyInfo &BFI) {
- return PSI->isFunctionColdInCallGraphNthPercentile(CutOff, F, BFI);
- }
- static bool isColdBlock(const BasicBlock *BB,
- ProfileSummaryInfo *PSI,
- BlockFrequencyInfo *BFI) {
- return PSI->isColdBlock(BB, BFI);
- }
- static bool isHotBlockNthPercentile(int CutOff,
- const BasicBlock *BB,
- ProfileSummaryInfo *PSI,
- BlockFrequencyInfo *BFI) {
- return PSI->isHotBlockNthPercentile(CutOff, BB, BFI);
- }
- static bool isColdBlockNthPercentile(int CutOff, const BasicBlock *BB,
- ProfileSummaryInfo *PSI,
- BlockFrequencyInfo *BFI) {
- return PSI->isColdBlockNthPercentile(CutOff, BB, BFI);
- }
-};
-} // end anonymous namespace
-
bool llvm::shouldOptimizeForSize(const Function *F, ProfileSummaryInfo *PSI,
BlockFrequencyInfo *BFI,
PGSOQueryType QueryType) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/222536
More information about the llvm-commits
mailing list