LLVM 20.0.0git
|
Module pass, wrapping the inliner pass. More...
#include "llvm/Transforms/IPO/Inliner.h"
Public Member Functions | |
ModuleInlinerWrapperPass (InlineParams Params=getInlineParams(), bool MandatoryFirst=true, InlineContext IC={}, InliningAdvisorMode Mode=InliningAdvisorMode::Default, unsigned MaxDevirtIterations=0) | |
ModuleInlinerWrapperPass (ModuleInlinerWrapperPass &&Arg)=default | |
PreservedAnalyses | run (Module &, ModuleAnalysisManager &) |
CGSCCPassManager & | getPM () |
Allow adding more CGSCC passes, besides inlining. | |
template<class T > | |
void | addModulePass (T Pass) |
Add a module pass that runs before the CGSCC passes. | |
template<class T > | |
void | addLateModulePass (T Pass) |
Add a module pass that runs after the CGSCC passes. | |
void | printPipeline (raw_ostream &OS, function_ref< StringRef(StringRef)> MapClassName2PassName) |
Public Member Functions inherited from llvm::PassInfoMixin< ModuleInlinerWrapperPass > | |
void | printPipeline (raw_ostream &OS, function_ref< StringRef(StringRef)> MapClassName2PassName) |
Additional Inherited Members | |
Static Public Member Functions inherited from llvm::PassInfoMixin< ModuleInlinerWrapperPass > | |
static StringRef | name () |
Gets the name of the pass we are mixed into. | |
Module pass, wrapping the inliner pass.
This works in conjunction with the InlineAdvisorAnalysis to facilitate inlining decisions taking into account module-wide state, that need to keep track of inter-inliner pass runs, for a given module. An InlineAdvisor is configured and kept alive for the duration of the ModuleInlinerWrapperPass::run.
ModuleInlinerWrapperPass::ModuleInlinerWrapperPass | ( | InlineParams | Params = getInlineParams() , |
bool | MandatoryFirst = true , |
||
InlineContext | IC = {} , |
||
InliningAdvisorMode | Mode = InliningAdvisorMode::Default , |
||
unsigned | MaxDevirtIterations = 0 |
||
) |
Definition at line 580 of file Inliner.cpp.
References llvm::PassManager< IRUnitT, AnalysisManagerT, ExtraArgTs >::addPass(), llvm::dbgs(), and EnablePostSCCAdvisorPrinting.
|
default |
Add a module pass that runs after the CGSCC passes.
Definition at line 83 of file Inliner.h.
References llvm::PassManager< IRUnitT, AnalysisManagerT, ExtraArgTs >::addPass().
Add a module pass that runs before the CGSCC passes.
Definition at line 78 of file Inliner.h.
References llvm::PassManager< IRUnitT, AnalysisManagerT, ExtraArgTs >::addPass().
Referenced by llvm::PassBuilder::buildInlinerPipeline().
|
inline |
void ModuleInlinerWrapperPass::printPipeline | ( | raw_ostream & | OS, |
function_ref< StringRef(StringRef)> | MapClassName2PassName | ||
) |
Definition at line 649 of file Inliner.cpp.
References llvm::PassManager< IRUnitT, AnalysisManagerT, ExtraArgTs >::isEmpty(), llvm::MaxDevirtIterations, OS, and llvm::PassManager< IRUnitT, AnalysisManagerT, ExtraArgTs >::printPipeline().
PreservedAnalyses ModuleInlinerWrapperPass::run | ( | Module & | M, |
ModuleAnalysisManager & | MAM | ||
) |
Definition at line 602 of file Inliner.cpp.
References llvm::AnalysisManager< IRUnitT, ExtraArgTs >::getResult(), and MAM.