45 return I != PassInfoMap.
end() ? I->second :
nullptr;
51 return I != PassInfoStringMap.
end() ? I->second :
nullptr;
62 assert(Inserted &&
"Pass registered multiple times!");
67 for (
auto *Listener : Listeners)
68 Listener->passRegistered(&PI);
71 ToFree.push_back(std::unique_ptr<const PassInfo>(&PI));
76 for (
auto PassInfoPair : PassInfoMap)
83 PassInfo &Registeree,
bool isDefault,
89 InterfaceInfo = &Registeree;
92 "Trying to join an analysis group that is a normal pass!");
96 assert(ImplementationInfo &&
97 "Must register pass before adding to AnalysisGroup!");
107 "Default implementation for analysis group already specified!");
110 "Cannot specify pass as default if it does not have a default ctor");
116 ToFree.push_back(std::unique_ptr<const PassInfo>(&Registeree));
121 Listeners.push_back(L);
const PassInfo * getPassInfo(const void *TI) const
getPassInfo - Look up a pass' corresponding PassInfo, indexed by the pass' type identifier (&MyPass::...
void registerAnalysisGroup(const void *InterfaceID, const void *PassID, PassInfo &Registeree, bool isDefault, bool ShouldFree=false)
registerAnalysisGroup - Register an analysis group (or a pass implementing
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
void setNormalCtor(NormalCtor_t Ctor)
void enumerateWith(PassRegistrationListener *L)
enumerateWith - Enumerate the registered passes, calling the provided PassRegistrationListener's pass...
This class represents lattice values for constants.
iterator find(StringRef Key)
std::pair< iterator, bool > insert(const std::pair< KeyT, ValueT > &KV)
void addInterfaceImplemented(const PassInfo *ItfPI)
addInterfaceImplemented - This method is called when this pass is registered as a member of an analys...
void removeRegistrationListener(PassRegistrationListener *L)
removeRegistrationListener - Unregister a PassRegistrationListener so that it no longer receives pass...
NormalCtor_t getNormalCtor() const
getNormalCtor - Return a pointer to a function, that when called, creates an instance of the pass and...
ScopedReader - RAII acquisition of a reader lock.
ScopedWriter - RAII acquisition of a writer lock.
const void * getTypeInfo() const
getTypeInfo - Return the id object for the pass...
iterator find(const_arg_type_t< KeyT > Val)
virtual void passEnumerate(const PassInfo *)
passEnumerate - Callback function invoked when someone calls enumeratePasses on this PassRegistration...
void addRegistrationListener(PassRegistrationListener *L)
addRegistrationListener - Register the given PassRegistrationListener to receive passRegistered() cal...
PassInfo class - An instance of this class exists for every pass known by the system, and can be obtained from a live Pass by calling its getPassInfo() method.
auto find(R &&Range, const T &Val) -> decltype(adl_begin(Range))
Provide wrappers to std::find which take ranges instead of having to pass begin/end explicitly...
amdgpu Simplify well known AMD library false Value Value * Arg
static ManagedStatic< PassRegistry > PassRegistryObj
bool isAnalysisGroup() const
isAnalysisGroup - Return true if this is an analysis group, not a normal pass.
PassRegistrationListener class - This class is meant to be derived from by clients that are intereste...
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
StringRef getPassArgument() const
getPassArgument - Return the command line option that may be passed to 'opt' that will cause this pas...
StringRef - Represent a constant reference to a string, i.e.
PassRegistry - This class manages the registration and intitialization of the pass subsystem as appli...
ManagedStatic - This transparently changes the behavior of global statics to be lazily constructed on...
void registerPass(const PassInfo &PI, bool ShouldFree=false)
registerPass - Register a pass (by means of its PassInfo) with the registry.