MLIR 22.0.0git
mlir::HeapAsmResourceBlob Class Reference

This class provides a simple utility wrapper for creating heap allocated AsmResourceBlobs. More...

#include "mlir/IR/AsmState.h"

Static Public Member Functions

static AsmResourceBlob allocate (size_t size, size_t align, bool dataIsMutable=true)
 Create a new heap allocated blob with the given size and alignment.
static AsmResourceBlob allocateAndCopyWithAlign (ArrayRef< char > data, size_t align, bool dataIsMutable=true)
 Create a new heap allocated blob and copy the provided data into it.
template<typename T>
static AsmResourceBlob allocateAndCopyInferAlign (ArrayRef< T > data, bool dataIsMutable=true)

Detailed Description

This class provides a simple utility wrapper for creating heap allocated AsmResourceBlobs.

Definition at line 189 of file AsmState.h.

Member Function Documentation

◆ allocate()

AsmResourceBlob mlir::HeapAsmResourceBlob::allocate ( size_t size,
size_t align,
bool dataIsMutable = true )
inlinestatic

Create a new heap allocated blob with the given size and alignment.

dataIsMutable indicates if the allocated data can be mutated. By default, we treat heap allocated blobs as mutable.

Definition at line 194 of file AsmState.h.

Referenced by allocateAndCopyWithAlign(), and mlir::AsmParsedResourceEntry::parseAsBlob().

◆ allocateAndCopyInferAlign()

template<typename T>
AsmResourceBlob mlir::HeapAsmResourceBlob::allocateAndCopyInferAlign ( ArrayRef< T > data,
bool dataIsMutable = true )
inlinestatic

Definition at line 212 of file AsmState.h.

References allocateAndCopyWithAlign().

◆ allocateAndCopyWithAlign()

AsmResourceBlob mlir::HeapAsmResourceBlob::allocateAndCopyWithAlign ( ArrayRef< char > data,
size_t align,
bool dataIsMutable = true )
inlinestatic

Create a new heap allocated blob and copy the provided data into it.

Definition at line 201 of file AsmState.h.

References allocate(), and mlir::AsmResourceBlob::getMutableData().

Referenced by allocateAndCopyInferAlign().


The documentation for this class was generated from the following file: