llvm::InlinerPass

The inliner pass for the new pass manager.

Synopsis

Declared in <llvm/Transforms/IPO/Inliner.h>

class InlinerPass
    : public OptionalPassInfoMixin<InlinerPass>

Description

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.

Base Classes

NameDescription
OptionalPassInfoMixin<InlinerPass>A CRTP mix-in for passes that can be skipped.

Member Functions

NameDescription
InlinerPass [constructor]Constructors
printPipeline Print this pass's pipeline representation to OS.
run Run the inliner over SCC C.

Static Member Functions

NameDescription
isRequired Return false; optional passes may be skipped.