MLIR  15.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"
+ Include dependency graph for TypeID.h:
+ This graph shows which files directly or indirectly include this file:

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
 TODO: Remove this file when SCCP and integer range analysis have been ported to the new framework.
 
 mlir::detail
 
 llvm
 The OpAsmOpInterface, see OpAsmInterface.td for more details.
 

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 */
TODO: Remove this file when SCCP and integer range analysis have been ported to the new framework...

Definition at line 249 of file TypeID.h.

Referenced by mlir::SelfOwningTypeID::getTypeID().

◆ 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 "`");
static constexpr const bool value
llvm::is_detected< has_resolve_typeid_trait, T > has_resolve_typeid
Definition: TypeID.h:211

Definition at line 274 of file TypeID.h.

Referenced by areSameBitwidthScalarType(), and mlir::DynamicOpDefinition::get().

◆ 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 */
TODO: Remove this file when SCCP and integer range analysis have been ported to the new framework...

Definition at line 263 of file TypeID.h.

Referenced by mlir::detail::FallbackTypeIDResolver::registerImplicitTypeID().