[llvm] 364cd76 - [NFC] Expose the -Oz module optimization pipeline to opt

Mircea Trofin via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 20 09:58:51 PDT 2020


I was thinking about that, but couldn't come up with a meaningful one. We
may actually remove this flag, too (because of this reason) and find an
alternative way to satisfy our scenario. Meanwhile, the impact of the flag
is arguably quite negligible, and it's currently unblocking progress.

On Thu, Aug 20, 2020 at 9:49 AM Florian Hahn <florian_hahn at apple.com> wrote:

>
>
> > On Aug 20, 2020, at 17:29, Mircea Trofin via llvm-commits <
> llvm-commits at lists.llvm.org> wrote:
> >
> >
> > Author: Mircea Trofin
> > Date: 2020-08-20T09:28:58-07:00
> > New Revision: 364cd768a2764211ec0cbcf0c0bdbe4d8f4565b9
> >
> > URL:
> https://github.com/llvm/llvm-project/commit/364cd768a2764211ec0cbcf0c0bdbe4d8f4565b9
> > DIFF:
> https://github.com/llvm/llvm-project/commit/364cd768a2764211ec0cbcf0c0bdbe4d8f4565b9.diff
> >
> > LOG: [NFC] Expose the -Oz module optimization pipeline to opt
> >
> > This exposes the module optimization pipeline as a pass that can be
> > applied stand-alone when using 'opt'. This helps ml inliner training
> > scenarios, where we start with IR captured right before inlining,
> > perform the inlining (-scc-oz-module-inliner) and then want to continue
> > and observe the final IR (where this patch comes into play). We can then
> > apply llc on the resulting IR to continue compilation down to native.
> >
> > Differential Revision: https://reviews.llvm.org/D86224
> >
> > Added:
> >
> >
> > Modified:
> >    llvm/lib/Passes/PassRegistry.def
> >
> > Removed:
> >
> >
> >
> >
> ################################################################################
> > diff  --git a/llvm/lib/Passes/PassRegistry.def
> b/llvm/lib/Passes/PassRegistry.def
> > index e0d7a4b5b2d9..1176db872c59 100644
> > --- a/llvm/lib/Passes/PassRegistry.def
> > +++ b/llvm/lib/Passes/PassRegistry.def
> > @@ -85,6 +85,8 @@ MODULE_PASS("rpo-function-attrs",
> ReversePostOrderFunctionAttrsPass())
> > MODULE_PASS("sample-profile", SampleProfileLoaderPass())
> > MODULE_PASS("scc-oz-module-inliner",
> >   buildInlinerPipeline(OptimizationLevel::Oz, ThinLTOPhase::None,
> DebugLogging))
> > +MODULE_PASS("oz-module-optimizer",
> > +  buildModuleOptimizationPipeline(OptimizationLevel::Oz, DebugLogging,
> /*LTOPreLink*/false))
> > MODULE_PASS("strip-dead-prototypes", StripDeadPrototypesPass())
> > MODULE_PASS("synthetic-counts-propagation", SyntheticCountsPropagation())
> > MODULE_PASS("wholeprogramdevirt", WholeProgramDevirtPass(nullptr,
> nullptr))
> >
>
>
> Is it possible to have a test for the new option?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200820/b798f0bc/attachment.html>


More information about the llvm-commits mailing list