LLVM  8.0.1
Public Member Functions | List of all members
llvm::PassManager< IRUnitT, AnalysisManagerT, ExtraArgTs > Class Template Reference

Manages a sequence of passes over a particular unit of IR. More...

#include "llvm/IR/PassManager.h"

Inheritance diagram for llvm::PassManager< IRUnitT, AnalysisManagerT, ExtraArgTs >:
Inheritance graph
[legend]
Collaboration diagram for llvm::PassManager< IRUnitT, AnalysisManagerT, ExtraArgTs >:
Collaboration graph
[legend]

Public Member Functions

 PassManager (bool DebugLogging=false)
 Construct a pass manager. More...
 
 PassManager (PassManager &&Arg)
 
PassManageroperator= (PassManager &&RHS)
 
PreservedAnalyses run (IRUnitT &IR, AnalysisManagerT &AM, ExtraArgTs... ExtraArgs)
 Run all of the passes in this manager over the given unit of IR. More...
 
template<typename PassT >
void addPass (PassT Pass)
 
template<>
PreservedAnalyses run (LazyCallGraph::SCC &InitialC, CGSCCAnalysisManager &AM, LazyCallGraph &G, CGSCCUpdateResult &UR)
 
template<>
PreservedAnalyses run (Loop &InitialL, LoopAnalysisManager &AM, LoopStandardAnalysisResults &AnalysisResults, LPMUpdater &U)
 
template<>
PreservedAnalyses run (LazyCallGraph::SCC &InitialC, CGSCCAnalysisManager &AM, LazyCallGraph &G, CGSCCUpdateResult &UR)
 Explicitly specialize the pass manager run method to handle call graph updates. More...
 
template<>
PreservedAnalyses run (Loop &L, LoopAnalysisManager &AM, LoopStandardAnalysisResults &AR, LPMUpdater &U)
 Explicitly specialize the pass manager's run method to handle loop nest structure updates. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from llvm::PassInfoMixin< PassManager< IRUnitT, AnalysisManagerT, ExtraArgTs... > >
static StringRef name ()
 Gets the name of the pass we are mixed into. More...
 

Detailed Description

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

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

A pass manager contains a sequence of passes to run over a particular unit of IR (e.g. Functions, Modules). It is itself a valid pass over that unit of IR, and when run over some given IR will run 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 will propagate that analysis manager to each pass it runs, and will call the analysis manager's invalidation routine with the PreservedAnalyses of each pass it runs.

Definition at line 458 of file PassManager.h.

Constructor & Destructor Documentation

◆ PassManager() [1/2]

template<typename IRUnitT, typename AnalysisManagerT = AnalysisManager<IRUnitT>, typename... ExtraArgTs>
llvm::PassManager< IRUnitT, AnalysisManagerT, ExtraArgTs >::PassManager ( bool  DebugLogging = false)
inlineexplicit

Construct a pass manager.

If DebugLogging is true, we'll log our progress to llvm::dbgs().

Definition at line 464 of file PassManager.h.

◆ PassManager() [2/2]

template<typename IRUnitT, typename AnalysisManagerT = AnalysisManager<IRUnitT>, typename... ExtraArgTs>
llvm::PassManager< IRUnitT, AnalysisManagerT, ExtraArgTs >::PassManager ( PassManager< IRUnitT, AnalysisManagerT, ExtraArgTs > &&  Arg)
inline

Definition at line 470 of file PassManager.h.

Member Function Documentation

◆ addPass()

template<typename IRUnitT, typename AnalysisManagerT = AnalysisManager<IRUnitT>, typename... ExtraArgTs>
template<typename PassT >
void llvm::PassManager< IRUnitT, AnalysisManagerT, ExtraArgTs >::addPass ( PassT  Pass)
inline

◆ operator=()

template<typename IRUnitT, typename AnalysisManagerT = AnalysisManager<IRUnitT>, typename... ExtraArgTs>
PassManager& llvm::PassManager< IRUnitT, AnalysisManagerT, ExtraArgTs >::operator= ( PassManager< IRUnitT, AnalysisManagerT, ExtraArgTs > &&  RHS)
inline

Definition at line 474 of file PassManager.h.

◆ run() [1/5]

Explicitly specialize the pass manager's run method to handle loop nest structure updates.

Definition at line 26 of file LoopPassManager.cpp.

◆ run() [2/5]

Explicitly specialize the pass manager run method to handle call graph updates.

Definition at line 54 of file CGSCCPassManager.cpp.

◆ run() [3/5]

◆ run() [4/5]

◆ run() [5/5]

template<typename IRUnitT, typename AnalysisManagerT = AnalysisManager<IRUnitT>, typename... ExtraArgTs>
PreservedAnalyses llvm::PassManager< IRUnitT, AnalysisManagerT, ExtraArgTs >::run ( IRUnitT &  IR,
AnalysisManagerT &  AM,
ExtraArgTs...  ExtraArgs 
)
inline

Run all of the passes in this manager over the given unit of IR.

ExtraArgs are passed to each pass.

Definition at line 482 of file PassManager.h.

Referenced by eliminateDeadCode().


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