LLVM 20.0.0git
|
The inliner pass for the new pass manager. More...
#include "llvm/Transforms/IPO/Inliner.h"
Public Member Functions | |
InlinerPass (bool OnlyMandatory=false, ThinOrFullLTOPhase LTOPhase=ThinOrFullLTOPhase::None) | |
InlinerPass (InlinerPass &&Arg)=default | |
PreservedAnalyses | run (LazyCallGraph::SCC &C, CGSCCAnalysisManager &AM, LazyCallGraph &CG, CGSCCUpdateResult &UR) |
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. | |
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 |
|
default |
void InlinerPass::printPipeline | ( | raw_ostream & | OS, |
function_ref< StringRef(StringRef)> | MapClassName2PassName | ||
) |
Definition at line 641 of file Inliner.cpp.
References OS, and printPipeline().
Referenced by printPipeline().
PreservedAnalyses InlinerPass::run | ( | LazyCallGraph::SCC & | C, |
CGSCCAnalysisManager & | AM, | ||
LazyCallGraph & | CG, | ||
CGSCCUpdateResult & | UR | ||
) |
Definition at line 208 of file Inliner.cpp.
References assert(), llvm::LazyCallGraph::SCC::begin(), DEBUG_TYPE, FAM, llvm::AnalysisManager< IRUnitT, ExtraArgTs >::getResult(), I, instructions, N, llvm::InlineAdvisor::onPassEntry(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::setInlineRemark(), and llvm::LazyCallGraph::SCC::size().