diff --git a/llvm/include/llvm/Transforms/Utils/SizeOpts.h b/llvm/include/llvm/Transforms/Utils/SizeOpts.h --- a/llvm/include/llvm/Transforms/Utils/SizeOpts.h +++ b/llvm/include/llvm/Transforms/Utils/SizeOpts.h @@ -19,7 +19,6 @@ extern llvm::cl::opt EnablePGSO; extern llvm::cl::opt PGSOLargeWorkingSetSizeOnly; -extern llvm::cl::opt PGSOIRPassOrTestOnly; extern llvm::cl::opt PGSOColdCodeOnly; extern llvm::cl::opt PGSOColdCodeOnlyForInstrPGO; extern llvm::cl::opt PGSOColdCodeOnlyForSamplePGO; @@ -60,11 +59,6 @@ return true; if (!EnablePGSO) return false; - // Temporarily enable size optimizations only for the IR pass or test query - // sites for gradual commit/rollout. This is to be removed later. - if (PGSOIRPassOrTestOnly && !(QueryType == PGSOQueryType::IRPass || - QueryType == PGSOQueryType::Test)) - return false; if (isPGSOColdCodeOnly(PSI)) return AdapterT::isFunctionColdInCallGraph(F, PSI, *BFI); if (PSI->hasSampleProfile()) @@ -85,11 +79,6 @@ return true; if (!EnablePGSO) return false; - // Temporarily enable size optimizations only for the IR pass or test query - // sites for gradual commit/rollout. This is to be removed later. - if (PGSOIRPassOrTestOnly && !(QueryType == PGSOQueryType::IRPass || - QueryType == PGSOQueryType::Test)) - return false; if (isPGSOColdCodeOnly(PSI)) return AdapterT::isColdBlock(BBOrBlockFreq, PSI, BFI); if (PSI->hasSampleProfile()) diff --git a/llvm/lib/Transforms/Utils/SizeOpts.cpp b/llvm/lib/Transforms/Utils/SizeOpts.cpp --- a/llvm/lib/Transforms/Utils/SizeOpts.cpp +++ b/llvm/lib/Transforms/Utils/SizeOpts.cpp @@ -43,11 +43,6 @@ cl::desc("Apply the profile guided size optimizations only " "to cold code under partial-profile sample PGO.")); -cl::opt PGSOIRPassOrTestOnly( - "pgso-ir-pass-or-test-only", cl::Hidden, cl::init(false), - cl::desc("Apply the profile guided size optimizations only" - "to the IR passes or tests.")); - cl::opt ForcePGSO( "force-pgso", cl::Hidden, cl::init(false), cl::desc("Force the (profiled-guided) size optimizations. "));