[PATCH] D79042: [llvm] Add interface to drive inlining decision using ML model

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 12 09:39:23 PDT 2020


davidxl added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/Inliner.cpp:1074
+  // module pipeline by walking the SCCs in postorder (or bottom-up).
+  if (MaxDevirtIterations > 0)
+    MPM.addPass(createModuleToPostOrderCGSCCPassAdaptor(
----------------
mtrofin wrote:
> davidxl wrote:
> > Is this guard needed?
> Well... only to avoid creating a wrapper if one isn't needed?
While this is a good change, it seems irrelevant to this patch though.


================
Comment at: llvm/lib/Transforms/IPO/Inliner.cpp:1078
+  else
+    MPM.addPass(createModuleToPostOrderCGSCCPassAdaptor(std::move(PM)));
+  auto Ret = MPM.run(M, MAM);
----------------
so this pass injects the inliner pass into the pipeline in a lazy way (on the fly as it runs)?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79042





More information about the llvm-commits mailing list