[PATCH] D77752: [llvm] Machine Learned policy for inlining -Oz

Mircea Trofin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 20 21:16:25 PDT 2020


mtrofin updated this revision to Diff 279316.
mtrofin added a comment.

(trying again - clearing this change)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77752/new/

https://reviews.llvm.org/D77752

Files:
  llvm/include/llvm/Transforms/Utils/SizeOpts.h
  llvm/lib/Transforms/Utils/SizeOpts.cpp


Index: llvm/lib/Transforms/Utils/SizeOpts.cpp
===================================================================
--- llvm/lib/Transforms/Utils/SizeOpts.cpp
+++ 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<bool> 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<bool> ForcePGSO(
     "force-pgso", cl::Hidden, cl::init(false),
     cl::desc("Force the (profiled-guided) size optimizations. "));
Index: llvm/include/llvm/Transforms/Utils/SizeOpts.h
===================================================================
--- llvm/include/llvm/Transforms/Utils/SizeOpts.h
+++ llvm/include/llvm/Transforms/Utils/SizeOpts.h
@@ -19,7 +19,6 @@
 
 extern llvm::cl::opt<bool> EnablePGSO;
 extern llvm::cl::opt<bool> PGSOLargeWorkingSetSizeOnly;
-extern llvm::cl::opt<bool> PGSOIRPassOrTestOnly;
 extern llvm::cl::opt<bool> PGSOColdCodeOnly;
 extern llvm::cl::opt<bool> PGSOColdCodeOnlyForInstrPGO;
 extern llvm::cl::opt<bool> 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())


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77752.279316.patch
Type: text/x-patch
Size: 2272 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200721/4fbeaea1/attachment-0001.bin>


More information about the llvm-commits mailing list