LLVM  10.0.0svn
Public Member Functions | List of all members
llvm::InlinerPass Class Reference

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

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

Inheritance diagram for llvm::InlinerPass:
Inheritance graph
Collaboration diagram for llvm::InlinerPass:
Collaboration graph

Public Member Functions

 InlinerPass (InlineParams Params=getInlineParams())
 ~InlinerPass ()
 InlinerPass (InlinerPass &&Arg)
PreservedAnalyses run (LazyCallGraph::SCC &C, CGSCCAnalysisManager &AM, LazyCallGraph &CG, CGSCCUpdateResult &UR)

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

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 94 of file Inliner.h.

Constructor & Destructor Documentation

◆ InlinerPass() [1/2]

llvm::InlinerPass::InlinerPass ( InlineParams  Params = getInlineParams())

Definition at line 96 of file Inliner.h.

◆ ~InlinerPass()

InlinerPass::~InlinerPass ( )

◆ InlinerPass() [2/2]

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

Definition at line 99 of file Inliner.h.

References C, and llvm::LegacyInlinerBase::ImportedFunctionsStats.

Member Function Documentation

◆ run()

PreservedAnalyses InlinerPass::run ( LazyCallGraph::SCC C,
CGSCCAnalysisManager AM,
LazyCallGraph CG,
CGSCCUpdateResult UR 

Definition at line 868 of file Inliner.cpp.

References llvm::PreservedAnalyses::all(), llvm::any_of(), assert(), llvm::SmallVectorTemplateCommon< T >::begin(), C, Callee, llvm::AnalysisManager< IRUnitT, ExtraArgTs >::clear(), llvm::CGSCCUpdateResult::CWorklist, llvm::dbgs(), DEBUG_TYPE, llvm::Function::dropAllReferences(), E, emit_inlined_into(), llvm::SmallVectorBase::empty(), llvm::SmallVectorTemplateCommon< T >::end(), llvm::SmallVectorImpl< T >::erase(), F(), llvm::find(), first, llvm::AnalysisManager< IRUnitT, ExtraArgTs >::getCachedResult(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, CallBrTy, IterTy >::getCalledFunction(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, CallBrTy, IterTy >::getCaller(), llvm::Function::getContext(), llvm::LLVMContext::getDiagHandlerPtr(), llvm::LegacyInlinerBase::getInlineCost(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, CallBrTy, IterTy >::getInstruction(), llvm::Value::getName(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, CallBrTy, IterTy >::getParent(), llvm::AnalysisManager< IRUnitT, ExtraArgTs >::getResult(), llvm::Optional< T >::getValue(), llvm::GlobalValue::hasLocalLinkage(), llvm::Function::hasOptNone(), llvm::Optional< T >::hasValue(), I, llvm::LegacyInlinerBase::ImportedFunctionsStats, inlineCostStr(), llvm::InlineFunctionInfo::InlinedCallSites, llvm::CGSCCUpdateResult::InlinedInternalEdges, llvm::InlineFunction(), InlineHistoryIncludes(), llvm::SetVector< T, SmallVector< T, N >, SmallDenseSet< T, N > >::insert(), llvm::instructions(), llvm::CGSCCUpdateResult::InvalidatedRefSCCs, llvm::CGSCCUpdateResult::InvalidatedSCCs, IR, llvm::LazyCallGraph::isLibFunction(), llvm::DiagnosticHandler::isMissedOptRemarkEnabled(), LLVM_DEBUG, llvm::LazyCallGraph::lookup(), llvm::LazyCallGraph::lookupSCC(), llvm::AttributeFuncs::mergeAttributesForInlining(), llvm::InlineResult::message, N, llvm::No, llvm::PreservedAnalyses::preserve(), llvm::LegacyInlinerBase::PSI, llvm::SmallVectorTemplateBase< T >::push_back(), llvm::ImportedFunctionsInliningStatistics::recordInline(), llvm::remove_if(), llvm::Constant::removeDeadConstantUsers(), llvm::LazyCallGraph::removeDeadFunction(), llvm::reverse(), setInlineRemark(), llvm::ImportedFunctionsInliningStatistics::setModuleInfo(), shouldInline(), llvm::SmallVectorBase::size(), llvm::updateCGAndAnalysisManagerForFunctionPass(), and llvm::Value::use_empty().

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