[PATCH] D79042: [llvm] Add interface to drive inlining decision using ML model
Mircea Trofin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 12 14:32:47 PDT 2020
mtrofin 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(
----------------
davidxl wrote:
> 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.
Fair enough - removed. The devirt wrapper is noop with MaxDevirtIterations == 0 anyway.
================
Comment at: llvm/lib/Transforms/IPO/Inliner.cpp:1078
+ else
+ MPM.addPass(createModuleToPostOrderCGSCCPassAdaptor(std::move(PM)));
+ auto Ret = MPM.run(M, MAM);
----------------
davidxl wrote:
> so this pass injects the inliner pass into the pipeline in a lazy way (on the fly as it runs)?
It's not lazily injected, in the sense that the parent PM is unaffected. We just use a PM as an implementation detail.
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