MLIR  19.0.0git
Classes | Namespaces | Macros | Functions
TypeID.h File Reference
#include "mlir/Support/LLVM.h"
#include "llvm/ADT/DenseMapInfo.h"
#include "llvm/ADT/Hashing.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Support/Allocator.h"
#include "llvm/Support/PointerLikeTypeTraits.h"
#include "llvm/Support/TypeName.h"

Go to the source code of this file.

Classes

class  mlir::TypeID
 This class provides an efficient unique identifier for a specific C++ type. More...
 
class  mlir::detail::FallbackTypeIDResolver
 This class provides a fallback for resolving TypeIDs. More...
 
class  mlir::detail::TypeIDResolver< T, Enable >
 This class provides a resolver for getting the ID for a given class T. More...
 
struct  mlir::detail::InlineTypeIDResolver
 This class provides utilities for resolving the TypeID of a class that provides a static TypeID resolveTypeID() method. More...
 
class  mlir::detail::TypeIDResolver< T, std::enable_if_t< InlineTypeIDResolver::has_resolve_typeid< T >::value > >
 This class provides a resolver for getting the ID for a given class T, when the class provides a static TypeID resolveTypeID() method. More...
 
class  mlir::TypeIDAllocator
 This class provides a way to define new TypeIDs at runtime. More...
 
class  mlir::SelfOwningTypeID
 Defines a TypeID for each instance of this class by using a pointer to the instance. More...
 
struct  llvm::DenseMapInfo< mlir::TypeID >
 
struct  llvm::PointerLikeTypeTraits< mlir::TypeID >
 We align TypeID::Storage by 8, so allow LLVM to steal the low bits. More...
 

Namespaces

 mlir
 Include the generated interface declarations.
 
 mlir::detail
 Detect if any of the given parameter types has a sub-element handler.
 
 llvm
 Include the generated interface declarations.
 

Macros

#define MLIR_DECLARE_EXPLICIT_TYPE_ID(CLASS_NAME)
 
#define MLIR_DEFINE_EXPLICIT_TYPE_ID(CLASS_NAME)
 
#define MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(CLASS_NAME)
 

Functions

inline ::llvm::hash_code mlir::hash_value (TypeID id)
 Enable hashing TypeID. More...
 

Macro Definition Documentation

◆ MLIR_DECLARE_EXPLICIT_TYPE_ID

#define MLIR_DECLARE_EXPLICIT_TYPE_ID (   CLASS_NAME)
Value:
namespace mlir { \
namespace detail { \
template <> \
class TypeIDResolver<CLASS_NAME> { \
public: \
static TypeID resolveTypeID() { return id; } \
\
private: \
static SelfOwningTypeID id; \
}; \
} /* namespace detail */ \
} /* namespace mlir */
Include the generated interface declarations.

Definition at line 249 of file TypeID.h.

◆ MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID

#define MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID (   CLASS_NAME)
Value:
static ::mlir::TypeID resolveTypeID() { \
static ::mlir::SelfOwningTypeID id; \
return id; \
} \
static_assert( \
CLASS_NAME>::value, \
"`MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID` must be placed in a " \
"public section of `" #CLASS_NAME "`");
llvm::is_detected< has_resolve_typeid_trait, T > has_resolve_typeid
Definition: TypeID.h:211

Definition at line 274 of file TypeID.h.

◆ MLIR_DEFINE_EXPLICIT_TYPE_ID

#define MLIR_DEFINE_EXPLICIT_TYPE_ID (   CLASS_NAME)
Value:
namespace mlir { \
namespace detail { \
SelfOwningTypeID TypeIDResolver<CLASS_NAME>::id = {}; \
} /* namespace detail */ \
} /* namespace mlir */

Definition at line 263 of file TypeID.h.