Manages and runs a sequence of passes over a particular unit of IR.

Synopsis

Declared in <llvm/IR/PassManager.h>

template<
    typename IRUnitT,
    typename AnalysisManagerT = AnalysisManager<IRUnitT>,
    typename... ExtraArgTs>
class PassManager
    : public RequiredPassInfoMixin<PassManager<IRUnitT, AnalysisManagerT, ExtraArgTs...>>

Description

A pass manager contains a sequence of passes to run over a particular unit of IR (for example, Functions or Modules). It is itself a valid pass over that unit of IR, and when run over some given IR it executes each of its contained passes in sequence. Pass managers are the primary and most basic building block of a pass pipeline.

When you run a pass manager, you provide an AnalysisManager<IRUnitT> argument. The pass manager propagates that analysis manager to each pass it runs, and calls the analysis manager's invalidation routine with each pass's PreservedAnalyses.

Base Classes

Name

Description

RequiredPassInfoMixin<PassManager<IRUnitT, AnalysisManagerT, ExtraArgTs...>>

A CRTP mix‐in for passes that should not be skipped.

Member Functions

Name

Description

PassManager [constructor]

Constructors

operator=

Move‐assign a pass manager, transferring its pass pipeline.

addPass

addPass overloads

isEmpty

Returns if the pass manager contains any passes.

printPipeline

Print the names of passes in this manager as a comma‐separated pipeline.

run

Run all of the passes in this manager over the given unit of IR. Any additional arguments are forwarded to each pass.

Static Member Functions

Name

Description

isRequired

Return true; required passes cannot be skipped.

Protected Type Aliases

Name

Description

PassConceptT

Type‐erased pass concept stored in this manager.

Protected Data Members

Name

Description

Passes

Sequence of type‐erased passes managed by this pass manager.

Specializations

Template Parameters

Name

Description

IRUnitT

IR unit type this manager runs over.

AnalysisManagerT

Analysis manager type propagated to each pass.

ExtraArgTs

Extra argument types forwarded to each pass.

Created with MrDocs