LLVM  14.0.0git
Classes | Namespaces | Macros
Registry.h File Reference
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/iterator_range.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/DynamicLibrary.h"
#include <memory>
Include dependency graph for Registry.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  llvm::SimpleRegistryEntry< T >
 A simple registry entry which provides only a name, description, and no-argument constructor. More...
 
class  llvm::Registry< T >
 A global registry used in conjunction with static constructors to make pluggable components (like targets or garbage collectors) "just work" when linked with an executable. More...
 
class  llvm::Registry< T >::node
 Node in linked list of entries. More...
 
class  llvm::Registry< T >::iterator
 Iterators for registry entries. More...
 
class  llvm::Registry< T >::Add< V >
 A static registration template. More...
 

Namespaces

 llvm
 ---------------------— PointerInfo ------------------------------------—
 

Macros

#define LLVM_INSTANTIATE_REGISTRY(REGISTRY_CLASS)
 Instantiate a registry class. More...
 

Macro Definition Documentation

◆ LLVM_INSTANTIATE_REGISTRY

#define LLVM_INSTANTIATE_REGISTRY (   REGISTRY_CLASS)
Value:
namespace llvm { \
template<typename T> typename Registry<T>::node *Registry<T>::Head = nullptr;\
template<typename T> typename Registry<T>::node *Registry<T>::Tail = nullptr;\
template<typename T> \
if (Tail) \
Tail->Next = N; \
else \
Head = N; \
Tail = N; \
} \
template<typename T> typename Registry<T>::iterator Registry<T>::begin() { \
return iterator(Head); \
} \
template REGISTRY_CLASS::node *Registry<REGISTRY_CLASS::type>::Head; \
template REGISTRY_CLASS::node *Registry<REGISTRY_CLASS::type>::Tail; \
template \
template REGISTRY_CLASS::iterator Registry<REGISTRY_CLASS::type>::begin(); \
}

Instantiate a registry class.

This provides template definitions of add_node, begin, and the Head and Tail pointers, then explicitly instantiates them. We could explicitly specialize them, instead of the two-step process of define then instantiate, but strictly speaking that's not allowed by the C++ standard (we would need to have explicit specialization declarations in all translation units where the specialization is used) so we don't.

Definition at line 137 of file Registry.h.

llvm
---------------------— PointerInfo ------------------------------------—
Definition: AllocatorList.h:23
llvm::CallingConv::Tail
@ Tail
Tail - This calling convention attemps to make calls as fast as possible while guaranteeing that tail...
Definition: CallingConv.h:81
llvm::Registry::add_node
static void add_node(node *N)
Add a node to the Registry: this is the interface between the plugin and the executable.
node
This currently compiles esp xmm0 movsd esp eax eax esp ret We should use not the dag combiner This is because dagcombine2 needs to be able to see through the X86ISD::Wrapper node
Definition: README-SSE.txt:406
llvm::Registry::node
friend class node
Definition: Registry.h:55
N
#define N
llvm::Registry::begin
static iterator begin()