LLVM
8.0.1
|
The inliner pass for the new pass manager. More...
#include "llvm/Transforms/IPO/Inliner.h"
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... | |
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.
|
inline |
InlinerPass::~InlinerPass | ( | ) |
Definition at line 861 of file Inliner.cpp.
References assert(), llvm::ImportedFunctionsInliningStatistics::dump(), llvm::LegacyInlinerBase::ImportedFunctionsStats, and llvm::No.
|
inline |
Definition at line 100 of file Inliner.h.
References C, and llvm::LegacyInlinerBase::ImportedFunctionsStats.
PreservedAnalyses InlinerPass::run | ( | LazyCallGraph::SCC & | C, |
CGSCCAnalysisManager & | AM, | ||
LazyCallGraph & | CG, | ||
CGSCCUpdateResult & | UR | ||
) |
Definition at line 869 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, IterTy >::getCalledFunction(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getCaller(), llvm::LegacyInlinerBase::getInlineCost(), llvm::Value::getName(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getParent(), llvm::AnalysisManager< IRUnitT, ExtraArgTs >::getResult(), llvm::Optional< T >::getValue(), llvm::Function::hasFnAttribute(), llvm::GlobalValue::hasLocalLinkage(), 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_DEBUG, llvm::LazyCallGraph::lookup(), llvm::LazyCallGraph::lookupSCC(), llvm::AttributeFuncs::mergeAttributesForInlining(), llvm::InlineResult::message, N, llvm::No, llvm::Attribute::OptimizeNone, 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().