[PGO][PGSO] Add an optional query type parameter to shouldOptimizeForSize.
Summary:
In case of a need to distinguish different query sites for gradual commit or
debugging of PGSO. NFC.
Reviewers: davidxl
Subscribers: hiraditya, zzheng, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70510
diff --git a/llvm/lib/CodeGen/MachineSizeOpts.cpp b/llvm/lib/CodeGen/MachineSizeOpts.cpp
index 0c2ef33..aff67f9 100644
--- a/llvm/lib/CodeGen/MachineSizeOpts.cpp
+++ b/llvm/lib/CodeGen/MachineSizeOpts.cpp
@@ -107,14 +107,16 @@
bool llvm::shouldOptimizeForSize(const MachineFunction *MF,
ProfileSummaryInfo *PSI,
- const MachineBlockFrequencyInfo *MBFI) {
+ const MachineBlockFrequencyInfo *MBFI,
+ PGSOQueryType QueryType) {
return shouldFuncOptimizeForSizeImpl<MachineBasicBlockBFIAdapter>(
- MF, PSI, MBFI);
+ MF, PSI, MBFI, QueryType);
}
bool llvm::shouldOptimizeForSize(const MachineBasicBlock *MBB,
ProfileSummaryInfo *PSI,
- const MachineBlockFrequencyInfo *MBFI) {
+ const MachineBlockFrequencyInfo *MBFI,
+ PGSOQueryType QueryType) {
return shouldOptimizeForSizeImpl<MachineBasicBlockBFIAdapter>(
- MBB, PSI, MBFI);
+ MBB, PSI, MBFI, QueryType);
}