LLVM 20.0.0git
Public Member Functions | List of all members
llvm::ModuleInlinerWrapperPass Class Reference

Module pass, wrapping the inliner pass. More...

#include "llvm/Transforms/IPO/Inliner.h"

Inheritance diagram for llvm::ModuleInlinerWrapperPass:
Inheritance graph
[legend]

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 &)
 
CGSCCPassManagergetPM ()
 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.
 

Detailed Description

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.

Definition at line 61 of file Inliner.h.

Constructor & Destructor Documentation

◆ ModuleInlinerWrapperPass() [1/2]

ModuleInlinerWrapperPass::ModuleInlinerWrapperPass ( InlineParams  Params = getInlineParams(),
bool  MandatoryFirst = true,
InlineContext  IC = {},
InliningAdvisorMode  Mode = InliningAdvisorMode::Default,
unsigned  MaxDevirtIterations = 0 
)

◆ ModuleInlinerWrapperPass() [2/2]

llvm::ModuleInlinerWrapperPass::ModuleInlinerWrapperPass ( ModuleInlinerWrapperPass &&  Arg)
default

Member Function Documentation

◆ addLateModulePass()

template<class T >
void llvm::ModuleInlinerWrapperPass::addLateModulePass ( T  Pass)
inline

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().

◆ addModulePass()

template<class T >
void llvm::ModuleInlinerWrapperPass::addModulePass ( T  Pass)
inline

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().

◆ getPM()

CGSCCPassManager & llvm::ModuleInlinerWrapperPass::getPM ( )
inline

Allow adding more CGSCC passes, besides inlining.

This should be called before run is called, as part of pass pipeline building.

Definition at line 75 of file Inliner.h.

◆ printPipeline()

void ModuleInlinerWrapperPass::printPipeline ( raw_ostream OS,
function_ref< StringRef(StringRef)>  MapClassName2PassName 
)

◆ run()

PreservedAnalyses ModuleInlinerWrapperPass::run ( Module M,
ModuleAnalysisManager MAM 
)

Definition at line 602 of file Inliner.cpp.

References llvm::AnalysisManager< IRUnitT, ExtraArgTs >::getResult(), and MAM.


The documentation for this class was generated from the following files: