[PATCH] D34309: [NewPM/Inliner] Customize threshold based on optlevel and sizelevel
    Chandler Carruth via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Jun 27 18:27:28 PDT 2017
    
    
  
chandlerc accepted this revision.
chandlerc added a comment.
This revision is now accepted and ready to land.
Minor nitpick below. Feel free to submit.
================
Comment at: lib/Passes/PassBuilder.cpp:872-873
   // Run the inliner now.
-  MPM.addPass(createModuleToPostOrderCGSCCPassAdaptor(InlinerPass()));
+  unsigned OptLevel = Level > O3 ? 2 : Level;
+  unsigned SizeLevel = Level > O3 ? Level - O3 : 0;
+  MPM.addPass(createModuleToPostOrderCGSCCPassAdaptor(
----------------
Noting that this is duplicated, maybe a static helper function:
  static InlineParams getInlineParamsFromOptLevel(...)
And have it do the call to `getInlineParams`?
https://reviews.llvm.org/D34309
    
    
More information about the llvm-commits
mailing list