[PATCH] D33382: [PartialInlining] introduce an internal option to add partial inlining pass in the pipeline (off by default for now)

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat May 20 21:30:49 PDT 2017


davidxl created this revision.
Herald added a subscriber: mehdi_amini.

This is the final preparation step to finally turn on partial inlining in one of the default optimization pipeline.

It is off by default for now, so there is no functional change to the compiler behavior for now. Adding the option make it more convenient for the feature to be widely tested before being enabled.


https://reviews.llvm.org/D33382

Files:
  lib/Transforms/IPO/PassManagerBuilder.cpp


Index: lib/Transforms/IPO/PassManagerBuilder.cpp
===================================================================
--- lib/Transforms/IPO/PassManagerBuilder.cpp
+++ lib/Transforms/IPO/PassManagerBuilder.cpp
@@ -44,6 +44,11 @@
 using namespace llvm;
 
 static cl::opt<bool>
+RunPartialInlining("partial-inlining", cl::init(false),
+                   cl::Hidden, cl::ZeroOrMore,
+                   cl::desc("Run Late Partial inlinining pass"));
+
+static cl::opt<bool>
 RunLoopVectorization("vectorize-loops", cl::Hidden,
                      cl::desc("Run the Loop vectorization passes"));
 
@@ -516,6 +521,8 @@
   // pass manager that we are specifically trying to avoid. To prevent this
   // we must insert a no-op module pass to reset the pass manager.
   MPM.add(createBarrierNoopPass());
+  if (RunPartialInlining)
+    MPM.add(createPartialInliningPass());
 
   if (!DisableUnitAtATime && OptLevel > 1 && !PrepareForLTO &&
       !PrepareForThinLTO)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33382.99682.patch
Type: text/x-patch
Size: 961 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170521/30acaf45/attachment.bin>


More information about the llvm-commits mailing list