[PATCH] D86224: [NFC] Expose the -Oz module optimization pipeline to opt

Mircea Trofin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 19 09:37:36 PDT 2020


mtrofin created this revision.
mtrofin added reviewers: davidxl, yundiqian, ebrevdo.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
mtrofin requested review of this revision.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D86224

Files:
  llvm/lib/Passes/PassRegistry.def


Index: llvm/lib/Passes/PassRegistry.def
===================================================================
--- llvm/lib/Passes/PassRegistry.def
+++ llvm/lib/Passes/PassRegistry.def
@@ -85,6 +85,8 @@
 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, false))
 MODULE_PASS("strip-dead-prototypes", StripDeadPrototypesPass())
 MODULE_PASS("synthetic-counts-propagation", SyntheticCountsPropagation())
 MODULE_PASS("wholeprogramdevirt", WholeProgramDevirtPass(nullptr, nullptr))


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86224.286582.patch
Type: text/x-patch
Size: 711 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200819/d28d23f3/attachment.bin>


More information about the llvm-commits mailing list