LLVM 19.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

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.

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

Constructor & Destructor Documentation

◆ InlinerPass() [1/2]

llvm::InlinerPass::InlinerPass ( bool  OnlyMandatory = false,
ThinOrFullLTOPhase  LTOPhase = ThinOrFullLTOPhase::None 

Definition at line 37 of file Inliner.h.

◆ InlinerPass() [2/2]

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

Member Function Documentation

◆ printPipeline()

void InlinerPass::printPipeline ( raw_ostream OS,
function_ref< StringRef(StringRef)>  MapClassName2PassName 

Definition at line 640 of file Inliner.cpp.

References OS, and printPipeline().

Referenced by printPipeline().

◆ run()

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

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