26 return &PassRegistryObj;
37 return PassInfoMap.
lookup(TI);
53 assert(Inserted &&
"Pass registered multiple times!");
58 for (
auto *Listener : Listeners)
59 Listener->passRegistered(&PI);
62 ToFree.push_back(std::unique_ptr<const PassInfo>(&PI));
67 for (
auto PassInfoPair : PassInfoMap)
68 L->passEnumerate(PassInfoPair.second);
74 PassInfo &Registeree,
bool isDefault,
80 InterfaceInfo = &Registeree;
83 "Trying to join an analysis group that is a normal pass!");
87 assert(ImplementationInfo &&
88 "Must register pass before adding to AnalysisGroup!");
98 "Default implementation for analysis group already specified!");
101 "Cannot specify pass as default if it does not have a default ctor");
107 ToFree.push_back(std::unique_ptr<const PassInfo>(&Registeree));
112 Listeners.push_back(L);
amdgpu Simplify well known AMD library false FunctionCallee Value * Arg
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
ValueT lookup(const_arg_type_t< KeyT > Val) const
lookup - Return the entry for the specified key, or a default constructed value if no such entry exis...
std::pair< iterator, bool > insert(const std::pair< KeyT, ValueT > &KV)
PassInfo class - An instance of this class exists for every pass known by the system,...
NormalCtor_t getNormalCtor() const
getNormalCtor - Return a pointer to a function, that when called, creates an instance of the pass and...
bool isAnalysisGroup() const
isAnalysisGroup - Return true if this is an analysis group, not a normal pass.
void setNormalCtor(NormalCtor_t Ctor)
void addInterfaceImplemented(const PassInfo *ItfPI)
addInterfaceImplemented - This method is called when this pass is registered as a member of an analys...
StringRef getPassArgument() const
getPassArgument - Return the command line option that may be passed to 'opt' that will cause this pas...
const void * getTypeInfo() const
getTypeInfo - Return the id object for the pass... TODO : Rename
PassRegistry - This class manages the registration and intitialization of the pass subsystem as appli...
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
void addRegistrationListener(PassRegistrationListener *L)
addRegistrationListener - Register the given PassRegistrationListener to receive passRegistered() cal...
void removeRegistrationListener(PassRegistrationListener *L)
removeRegistrationListener - Unregister a PassRegistrationListener so that it no longer receives pass...
void registerPass(const PassInfo &PI, bool ShouldFree=false)
registerPass - Register a pass (by means of its PassInfo) with the registry.
void enumerateWith(PassRegistrationListener *L)
enumerateWith - Enumerate the registered passes, calling the provided PassRegistrationListener's pass...
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
ValueTy lookup(StringRef Key) const
lookup - Return the entry for the specified key, or a default constructed value if no such entry exis...
StringRef - Represent a constant reference to a string, i.e.
const std::shared_lock< SmartRWMutex< mt_only > > SmartScopedReader
ScopedReader - RAII acquisition of a reader lock.
std::lock_guard< SmartRWMutex< mt_only > > SmartScopedWriter
ScopedWriter - RAII acquisition of a writer lock.
This is an optimization pass for GlobalISel generic memory operations.
auto find(R &&Range, const T &Val)
Provide wrappers to std::find which take ranges instead of having to pass begin/end explicitly.
PassRegistrationListener class - This class is meant to be derived from by clients that are intereste...