LLVM  12.0.0git
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 ()=default
 ~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 97 of file Inliner.h.

Constructor & Destructor Documentation

◆ InlinerPass() [1/2]

llvm::InlinerPass::InlinerPass ( )

◆ ~InlinerPass()

InlinerPass::~InlinerPass ( )

◆ InlinerPass() [2/2]

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

Definition at line 101 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 681 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, llvm::SmallVectorBase< SmallVectorSizeType< T > >::empty(), llvm::SmallVectorTemplateCommon< T >::end(), llvm::SmallVectorImpl< T >::erase(), F(), llvm::find(), llvm::InlineAdvisor::getAdvice(), llvm::CallBase::getCalledFunction(), llvm::CallBase::getCaller(), llvm::Value::getName(), llvm::AnalysisManager< IRUnitT, ExtraArgTs >::getResult(), llvm::GlobalValue::hasLocalLinkage(), llvm::Function::hasOptNone(), I, llvm::LegacyInlinerBase::ImportedFunctionsStats, 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::GlobalValue::isDeclaration(), llvm::LazyCallGraph::isLibFunction(), llvm::InlineResult::isSuccess(), LLVM_DEBUG, llvm::LazyCallGraph::lookup(), llvm::LazyCallGraph::lookupSCC(), llvm::make_scope_exit(), llvm::AttributeFuncs::mergeAttributesForInlining(), N, llvm::No, llvm::InlineAdvisor::onPassEntry(), llvm::InlineAdvisor::onPassExit(), P, llvm::PreservedAnalyses::preserve(), llvm::SmallVectorTemplateBase< T >::push_back(), llvm::ImportedFunctionsInliningStatistics::recordInline(), llvm::remove_if(), llvm::Constant::removeDeadConstantUsers(), llvm::LazyCallGraph::removeDeadFunction(), llvm::reverse(), llvm::setInlineRemark(), llvm::ImportedFunctionsInliningStatistics::setModuleInfo(), llvm::SmallVectorBase< SmallVectorSizeType< T > >::size(), llvm::tryPromoteCall(), llvm::updateCGAndAnalysisManagerForFunctionPass(), and llvm::Value::use_empty().

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