LLVM 20.0.0git
|
A CRTP mix-in that provides informational APIs needed for analysis passes. More...
#include "llvm/IR/PassManager.h"
Inherits llvm::PassInfoMixin< DerivedT >.
Static Public Member Functions | |
static AnalysisKey * | ID () |
Returns an opaque, unique ID for this analysis type. | |
Static Public Member Functions inherited from llvm::PassInfoMixin< DerivedT > | |
static StringRef | name () |
Gets the name of the pass we are mixed into. | |
Additional Inherited Members | |
Public Member Functions inherited from llvm::PassInfoMixin< DerivedT > | |
void | printPipeline (raw_ostream &OS, function_ref< StringRef(StringRef)> MapClassName2PassName) |
A CRTP mix-in that provides informational APIs needed for analysis passes.
This provides some boilerplate for types that are analysis passes. It automatically mixes in PassInfoMixin
.
Definition at line 92 of file PassManager.h.
|
inlinestatic |
Returns an opaque, unique ID for this analysis type.
This ID is a pointer type that is guaranteed to be 8-byte aligned and thus suitable for use in sets, maps, and other data structures that use the low bits of pointers.
Note that this requires the derived type provide a static AnalysisKey
member called Key
.
FIXME: The only reason the mixin type itself can't declare the Key value is that some compilers cannot correctly unique a templated static variable so it has the same addresses in each instantiation. The only currently known platform with this limitation is Windows DLL builds, specifically building each part of LLVM as a DLL. If we ever remove that build configuration, this mixin can provide the static key as well.
Definition at line 108 of file PassManager.h.