<div dir="ltr">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. </div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Aug 20, 2020 at 9:49 AM Florian Hahn <<a href="mailto:florian_hahn@apple.com">florian_hahn@apple.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
> On Aug 20, 2020, at 17:29, Mircea Trofin via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<br>
> <br>
> <br>
> Author: Mircea Trofin<br>
> Date: 2020-08-20T09:28:58-07:00<br>
> New Revision: 364cd768a2764211ec0cbcf0c0bdbe4d8f4565b9<br>
> <br>
> URL: <a href="https://github.com/llvm/llvm-project/commit/364cd768a2764211ec0cbcf0c0bdbe4d8f4565b9" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/364cd768a2764211ec0cbcf0c0bdbe4d8f4565b9</a><br>
> DIFF: <a href="https://github.com/llvm/llvm-project/commit/364cd768a2764211ec0cbcf0c0bdbe4d8f4565b9.diff" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/364cd768a2764211ec0cbcf0c0bdbe4d8f4565b9.diff</a><br>
> <br>
> LOG: [NFC] Expose the -Oz module optimization pipeline to opt<br>
> <br>
> This exposes the module optimization pipeline as a pass that can be<br>
> applied stand-alone when using 'opt'. This helps ml inliner training<br>
> scenarios, where we start with IR captured right before inlining,<br>
> perform the inlining (-scc-oz-module-inliner) and then want to continue<br>
> and observe the final IR (where this patch comes into play). We can then<br>
> apply llc on the resulting IR to continue compilation down to native.<br>
> <br>
> Differential Revision: <a href="https://reviews.llvm.org/D86224" rel="noreferrer" target="_blank">https://reviews.llvm.org/D86224</a><br>
> <br>
> Added: <br>
> <br>
> <br>
> Modified: <br>
>    llvm/lib/Passes/PassRegistry.def<br>
> <br>
> Removed: <br>
> <br>
> <br>
> <br>
> ################################################################################<br>
> diff  --git a/llvm/lib/Passes/PassRegistry.def b/llvm/lib/Passes/PassRegistry.def<br>
> index e0d7a4b5b2d9..1176db872c59 100644<br>
> --- a/llvm/lib/Passes/PassRegistry.def<br>
> +++ b/llvm/lib/Passes/PassRegistry.def<br>
> @@ -85,6 +85,8 @@ MODULE_PASS("rpo-function-attrs", ReversePostOrderFunctionAttrsPass())<br>
> MODULE_PASS("sample-profile", SampleProfileLoaderPass())<br>
> MODULE_PASS("scc-oz-module-inliner",<br>
>   buildInlinerPipeline(OptimizationLevel::Oz, ThinLTOPhase::None, DebugLogging))<br>
> +MODULE_PASS("oz-module-optimizer",<br>
> +  buildModuleOptimizationPipeline(OptimizationLevel::Oz, DebugLogging, /*LTOPreLink*/false))<br>
> MODULE_PASS("strip-dead-prototypes", StripDeadPrototypesPass())<br>
> MODULE_PASS("synthetic-counts-propagation", SyntheticCountsPropagation())<br>
> MODULE_PASS("wholeprogramdevirt", WholeProgramDevirtPass(nullptr, nullptr))<br>
> <br>
<br>
<br>
Is it possible to have a test for the new option?</blockquote></div>