From 8cdfdfeee6dada5d47eabe9c1d44ceb12235da8f Mon Sep 17 00:00:00 2001 From: Hiroshi Yamauchi Date: Wed, 20 Nov 2019 13:08:07 -0800 Subject: [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 --- llvm/lib/CodeGen/MachineSizeOpts.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'llvm/lib/CodeGen/MachineSizeOpts.cpp') diff --git a/llvm/lib/CodeGen/MachineSizeOpts.cpp b/llvm/lib/CodeGen/MachineSizeOpts.cpp index 0c2ef3321e0..aff67f9cfd5 100644 --- a/llvm/lib/CodeGen/MachineSizeOpts.cpp +++ b/llvm/lib/CodeGen/MachineSizeOpts.cpp @@ -107,14 +107,16 @@ struct MachineBasicBlockBFIAdapter { bool llvm::shouldOptimizeForSize(const MachineFunction *MF, ProfileSummaryInfo *PSI, - const MachineBlockFrequencyInfo *MBFI) { + const MachineBlockFrequencyInfo *MBFI, + PGSOQueryType QueryType) { return shouldFuncOptimizeForSizeImpl( - 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( - MBB, PSI, MBFI); + MBB, PSI, MBFI, QueryType); } -- cgit v1.2.3