10 #include "llvm/ADT/StringRef.h"
11 #include "llvm/Support/ThreadPool.h"
20 return llvm::StringRef(
string.data,
string.length) ==
28 return wrap(
new llvm::DefaultThreadPool());
39 assert(
reinterpret_cast<uintptr_t
>(ptr) % 8 == 0 &&
40 "ptr must be 8 byte aligned");
bool mlirTypeIDEqual(MlirTypeID typeID1, MlirTypeID typeID2)
Checks if two type ids are equal.
MlirTypeID mlirTypeIDCreate(const void *ptr)
ptr must be 8 byte aligned and unique to a type valid for the duration of the returned type id's usag...
size_t mlirTypeIDHashValue(MlirTypeID typeID)
Returns the hash value of the type id.
void mlirTypeIDAllocatorDestroy(MlirTypeIDAllocator allocator)
Deallocates the allocator and all allocated type ids.
void mlirLlvmThreadPoolDestroy(MlirLlvmThreadPool threadPool)
Destroy an LLVM thread pool.
MlirStringRef mlirStringRefCreateFromCString(const char *str)
Constructs a string reference from a null-terminated C string.
bool mlirStringRefEqual(MlirStringRef string, MlirStringRef other)
Returns true if two string references are equal, false otherwise.
MlirTypeID mlirTypeIDAllocatorAllocateTypeID(MlirTypeIDAllocator allocator)
Allocates a type id that is valid for the lifetime of the allocator.
MlirLlvmThreadPool mlirLlvmThreadPoolCreate()
Create an LLVM thread pool.
MlirTypeIDAllocator mlirTypeIDAllocatorCreate()
Creates a type id allocator for dynamic type id creation.
This class provides a way to define new TypeIDs at runtime.
static TypeID getFromOpaquePointer(const void *pointer)
mlir::Diagnostic & unwrap(MlirDiagnostic diagnostic)
MlirDiagnostic wrap(mlir::Diagnostic &diagnostic)
static MlirStringRef mlirStringRefCreate(const char *str, size_t length)
Constructs a string reference from the pointer and length.
inline ::llvm::hash_code hash_value(const PolynomialBase< D, T > &arg)
A pointer to a sized fragment of a string, not necessarily null-terminated.
const char * data
Pointer to the first symbol.
size_t length
Length of the fragment.