[NewPM] Make InlinerPass (aka 'inline') a parameterized pass
authorBjorn Pettersson <bjorn.a.pettersson@ericsson.com>
Thu, 16 Sep 2021 07:28:32 +0000 (09:28 +0200)
committerBjorn Pettersson <bjorn.a.pettersson@ericsson.com>
Mon, 20 Sep 2021 10:52:52 +0000 (12:52 +0200)
commitc8cb7f611fdf4d96c4d23a75aa48c93cca38646f
treeeb4e876c42b1712410039a402afc7ef3e52802da
parenteb3af1e77341e82249993a5a8a50779c48e1cb61
[NewPM] Make InlinerPass (aka 'inline') a parameterized pass

In default pipelines the ModuleInlinerWrapperPass is adding the
InlinerPass to the pipeline twice, once due to MandatoryFirst (passing
true in the ctor) and then a second time with false as argument.

To make it possible to bisect and reduce opt test cases for this
part of the pipeline we need to be able to choose between the two
different variants of the InlinerPass when running opt. This patch is
changing 'inline' to a CGSCC_PASS_WITH_PARAMS in the PassRegistry,
making it possible run opt with both -passes=cgscc(inline) and
-passes=cgscc(inline<only-mandatory>).

Reviewed By: aeubanks, mtrofin

Differential Revision: https://reviews.llvm.org/D109877
llvm/include/llvm/Transforms/IPO/Inliner.h
llvm/lib/Passes/PassBuilder.cpp
llvm/lib/Passes/PassRegistry.def
llvm/lib/Transforms/IPO/Inliner.cpp