LLVM 20.0.0git
|
Discriminated union of Pass ID types. More...
#include "llvm/CodeGen/TargetPassConfig.h"
Public Member Functions | |
IdentifyingPassPtr () | |
IdentifyingPassPtr (AnalysisID IDPtr) | |
IdentifyingPassPtr (Pass *InstancePtr) | |
bool | isValid () const |
bool | isInstance () const |
AnalysisID | getID () const |
Pass * | getInstance () const |
Discriminated union of Pass ID types.
The PassConfig API prefers dealing with IDs because they are safer and more efficient. IDs decouple configuration from instantiation. This way, when a pass is overriden, it isn't unnecessarily instantiated. It is also unsafe to refer to a Pass pointer after adding it to a pass manager, which deletes redundant pass instances.
However, it is convient to directly instantiate target passes with non-default ctors. These often don't have a registered PassInfo. Rather than force all target passes to implement the pass registry boilerplate, allow the PassConfig API to handle either type.
AnalysisID is sadly char*, so PointerIntPair won't work.
Definition at line 54 of file TargetPassConfig.h.
|
inline |
Definition at line 62 of file TargetPassConfig.h.
|
inline |
Definition at line 63 of file TargetPassConfig.h.
|
inline |
Definition at line 64 of file TargetPassConfig.h.
|
inline |
Definition at line 69 of file TargetPassConfig.h.
Referenced by llvm::TargetPassConfig::addPass(), INITIALIZE_PASS::InsertedPass::getInsertedPass(), llvm::TargetPassConfig::insertPass(), and llvm::TargetPassConfig::isPassSubstitutedOrOverridden().
|
inline |
Definition at line 74 of file TargetPassConfig.h.
Referenced by llvm::TargetPassConfig::addPass(), INITIALIZE_PASS::InsertedPass::getInsertedPass(), and llvm::TargetPassConfig::insertPass().
|
inline |
Definition at line 67 of file TargetPassConfig.h.
Referenced by llvm::TargetPassConfig::addPass(), INITIALIZE_PASS::InsertedPass::getInsertedPass(), llvm::TargetPassConfig::insertPass(), and llvm::TargetPassConfig::isPassSubstitutedOrOverridden().
|
inline |
Definition at line 66 of file TargetPassConfig.h.
References P.
Referenced by llvm::TargetPassConfig::addPass(), INITIALIZE_PASS::InsertedPass::getInsertedPass(), and llvm::TargetPassConfig::isPassSubstitutedOrOverridden().
AnalysisID llvm::IdentifyingPassPtr::ID |
Definition at line 56 of file TargetPassConfig.h.
Referenced by getID().
Pass* llvm::IdentifyingPassPtr::P |
Definition at line 57 of file TargetPassConfig.h.
Referenced by getInstance(), and isValid().