[NFC] Expose the -Oz module optimization pipeline to opt
authorMircea Trofin <mtrofin@google.com>
Wed, 19 Aug 2020 16:30:52 +0000 (09:30 -0700)
committerMircea Trofin <mtrofin@google.com>
Thu, 20 Aug 2020 16:28:58 +0000 (09:28 -0700)
commit364cd768a2764211ec0cbcf0c0bdbe4d8f4565b9
tree06ca860888233192b10173959b2449fa2900f380
parent0de3d0c61266675cd5e688a09e02124518e01935
[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
llvm/lib/Passes/PassRegistry.def