LLVM 22.0.0git
llvm::InlinerPass Class Reference

The inliner pass for the new pass manager. More...

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

Inheritance diagram for llvm::InlinerPass:
[legend]

Public Member Functions

 InlinerPass (bool OnlyMandatory=false, ThinOrFullLTOPhase LTOPhase=ThinOrFullLTOPhase::None)
 InlinerPass (InlinerPass &&Arg)=default
LLVM_ABI PreservedAnalyses run (LazyCallGraph::SCC &C, CGSCCAnalysisManager &AM, LazyCallGraph &CG, CGSCCUpdateResult &UR)
LLVM_ABI void printPipeline (raw_ostream &OS, function_ref< StringRef(StringRef)> MapClassName2PassName)
Public Member Functions inherited from llvm::PassInfoMixin< InlinerPass >
void printPipeline (raw_ostream &OS, function_ref< StringRef(StringRef)> MapClassName2PassName)

Additional Inherited Members

Static Public Member Functions inherited from llvm::PassInfoMixin< InlinerPass >
static StringRef name ()
 Gets the name of the pass we are mixed into.

Detailed 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.

Definition at line 36 of file Inliner.h.

Constructor & Destructor Documentation

◆ InlinerPass() [1/2]

llvm::InlinerPass::InlinerPass ( bool OnlyMandatory = false,
ThinOrFullLTOPhase LTOPhase = ThinOrFullLTOPhase::None )
inline

Definition at line 38 of file Inliner.h.

References llvm::None.

Referenced by InlinerPass().

◆ InlinerPass() [2/2]

llvm::InlinerPass::InlinerPass ( InlinerPass && Arg)
default

Member Function Documentation

◆ printPipeline()

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

Definition at line 644 of file Inliner.cpp.

References printPipeline().

Referenced by printPipeline().

◆ run()

Definition at line 206 of file Inliner.cpp.

References llvm::PreservedAnalyses::all(), llvm::any_of(), llvm::SmallVectorImpl< T >::append(), assert(), llvm::LazyCallGraph::SCC::begin(), llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::CallingConv::C, Call, Changed, llvm::AnalysisManager< IRUnitT, ExtraArgTs >::clear(), llvm::SetVector< T, Vector, Set, N >::clear(), llvm::CGSCCUpdateResult::CWorklist, llvm::dbgs(), llvm::CGSCCUpdateResult::DeadFunctions, DEBUG_TYPE, llvm::dyn_cast(), llvm::SmallVectorTemplateCommon< T, typename >::empty(), llvm::SmallVectorTemplateCommon< T, typename >::end(), llvm::SmallVectorImpl< T >::erase(), F, FAM, llvm::filterDeadComdatFunctions(), llvm::InlineConstants::FunctionInlineCostMultiplierAttributeName, llvm::Attribute::get(), llvm::LazyCallGraph::get(), llvm::InlineAdvisor::getAdvice(), llvm::CallBase::getCalledFunction(), llvm::CallBase::getCaller(), llvm::AnalysisManager< IRUnitT, ExtraArgTs >::getResult(), llvm::getStringFnAttrAsInt(), I, llvm::InlineFunctionInfo::InlinedCallSites, llvm::CGSCCUpdateResult::InlinedInternalEdges, llvm::InlineFunction(), inlineHistoryIncludes(), llvm::SetVector< T, Vector, Set, N >::insert(), instructions, IntraSCCCostMultiplier, llvm::CGSCCUpdateResult::InvalidatedSCCs, IR, llvm::is_contained(), llvm::isa(), llvm::GlobalValue::isDeclaration(), llvm::Function::isIntrinsic(), llvm::LazyCallGraph::isLibFunction(), llvm::itostr(), LLVM_DEBUG, llvm::LazyCallGraph::lookup(), llvm::LazyCallGraph::lookupSCC(), llvm::make_scope_exit(), makeFunctionBodyUnreachable(), llvm::LazyCallGraph::markDeadFunction(), N, llvm::PreservedAnalyses::none(), llvm::InlineAdvisor::onPassEntry(), llvm::InlineAdvisor::onPassExit(), P, llvm::PreservedAnalyses::preserve(), llvm::PreservedAnalyses::preserveSet(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::reverse(), llvm::setInlineRemark(), llvm::CallBase::setIsNoInline(), llvm::LazyCallGraph::SCC::size(), llvm::SmallVectorTemplateCommon< T, typename >::size(), llvm::tryPromoteCall(), and llvm::updateCGAndAnalysisManagerForCGSCCPass().


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