LLVM  6.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())
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 95 of file Inliner.h.

Constructor & Destructor Documentation

◆ InlinerPass()

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

Definition at line 97 of file Inliner.h.

References C.

Member Function Documentation

◆ run()

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

Definition at line 796 of file Inliner.cpp.

References llvm::PreservedAnalyses::all(), llvm::any_of(), assert(), C, Callee, llvm::AnalysisManager< IRUnitT, ExtraArgTs >::clear(), llvm::dbgs(), DEBUG, DEBUG_TYPE, llvm::Function::dropAllReferences(), E, llvm::SmallVectorTemplateCommon< T >::end(), F(), llvm::find(), llvm::AnalysisManager< IRUnitT, ExtraArgTs >::getCachedResult(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getCalledFunction(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getCaller(), llvm::InlineCost::getCost(), llvm::LegacyInlinerBase::getInlineCost(), llvm::Value::getName(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getParent(), llvm::AnalysisManager< IRUnitT, ExtraArgTs >::getResult(), llvm::InlineCost::getThreshold(), llvm::Function::hasFnAttribute(), llvm::GlobalValue::hasLocalLinkage(), I, 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, llvm::InlineCost::isAlways(), llvm::LazyCallGraph::isLibFunction(), llvm::LazyCallGraph::lookup(), llvm::LazyCallGraph::lookupSCC(), llvm::AttributeFuncs::mergeAttributesForInlining(), N, llvm::PreservedAnalyses::preserve(), llvm::LegacyInlinerBase::PSI, llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::remove_if(), llvm::Constant::removeDeadConstantUsers(), llvm::LazyCallGraph::removeDeadFunction(), llvm::reverse(), shouldInline(), llvm::SmallVectorTemplateCommon< T >::size(), llvm::updateCGAndAnalysisManagerForFunctionPass(), and llvm::Value::use_empty().

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