LLVM: llvm::IdentifyingPassPtr Class Reference (original) (raw)
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 53 of file TargetPassConfig.h.