class InlinerPass
Declaration
class InlinerPass : public PassInfoMixin { /* full declaration omitted */ };
Description
The inliner pass for the new pass manager. This pass wires together the inlining utilities and the inline cost analysis into a CGSCC pass. It considers every call in every function in the SCC and tries to inline if profitable. It can be tuned with a number of parameters to control what cost model is used and what tradeoffs are made when making the decision. It should be noted that the legacy inliners do considerably more than this inliner pass does. They provide logic for manually merging allocas, and doing considerable DCE including the DCE of dead functions. This pass makes every attempt to be simpler. DCE of functions requires complex reasoning about comdat groups, etc. Instead, it is expected that other more focused passes be composed to achieve the same end result.
Declared at: llvm/include/llvm/Transforms/IPO/Inliner.h:96
Inherits from: PassInfoMixin
Member Variables
- private std::unique_ptr<InlineAdvisor> OwnedAdvisor
- private const bool OnlyMandatory
- private const llvm::ThinOrFullLTOPhase LTOPhase
Method Overview
- public InlinerPass(bool OnlyMandatory = false, llvm::ThinOrFullLTOPhase LTOPhase = ThinOrFullLTOPhase::None)
- public InlinerPass(llvm::InlinerPass && Arg)
- private llvm::InlineAdvisor & getAdvisor(const ModuleAnalysisManagerCGSCCProxy::Result & MAM, llvm::FunctionAnalysisManager & FAM, llvm::Module & M)
- public void printPipeline(llvm::raw_ostream & OS, function_ref<llvm::StringRef (llvm::StringRef)> MapClassName2PassName)
- public llvm::PreservedAnalyses run(LazyCallGraph::SCC & C, llvm::CGSCCAnalysisManager & AM, llvm::LazyCallGraph & CG, llvm::CGSCCUpdateResult & UR)
Methods
¶InlinerPass(bool OnlyMandatory = false,
llvm::ThinOrFullLTOPhase LTOPhase =
ThinOrFullLTOPhase::None)
InlinerPass(bool OnlyMandatory = false,
llvm::ThinOrFullLTOPhase LTOPhase =
ThinOrFullLTOPhase::None)
Declared at: llvm/include/llvm/Transforms/IPO/Inliner.h:98
Parameters
- bool OnlyMandatory = false
- llvm::ThinOrFullLTOPhase LTOPhase = ThinOrFullLTOPhase::None
¶InlinerPass(llvm::InlinerPass&& Arg)
InlinerPass(llvm::InlinerPass&& Arg)
Declared at: llvm/include/llvm/Transforms/IPO/Inliner.h:101
Parameters
- llvm::InlinerPass&& Arg
¶llvm::InlineAdvisor& getAdvisor(
const ModuleAnalysisManagerCGSCCProxy::Result&
MAM,
llvm::FunctionAnalysisManager& FAM,
llvm::Module& M)
llvm::InlineAdvisor& getAdvisor(
const ModuleAnalysisManagerCGSCCProxy::Result&
MAM,
llvm::FunctionAnalysisManager& FAM,
llvm::Module& M)
Declared at: llvm/include/llvm/Transforms/IPO/Inliner.h:110
Parameters
- const ModuleAnalysisManagerCGSCCProxy::Result& MAM
- llvm::FunctionAnalysisManager& FAM
- llvm::Module& M
¶void printPipeline(
llvm::raw_ostream& OS,
function_ref<llvm::StringRef(llvm::StringRef)>
MapClassName2PassName)
void printPipeline(
llvm::raw_ostream& OS,
function_ref<llvm::StringRef(llvm::StringRef)>
MapClassName2PassName)
Declared at: llvm/include/llvm/Transforms/IPO/Inliner.h:106
Parameters
- llvm::raw_ostream& OS
- function_ref<llvm::StringRef(llvm::StringRef)> MapClassName2PassName
¶llvm::PreservedAnalyses run(
LazyCallGraph::SCC& C,
llvm::CGSCCAnalysisManager& AM,
llvm::LazyCallGraph& CG,
llvm::CGSCCUpdateResult& UR)
llvm::PreservedAnalyses run(
LazyCallGraph::SCC& C,
llvm::CGSCCAnalysisManager& AM,
llvm::LazyCallGraph& CG,
llvm::CGSCCUpdateResult& UR)
Declared at: llvm/include/llvm/Transforms/IPO/Inliner.h:103