My Project
Public Member Functions | Static Public Member Functions | List of all members
mlir::MemRefDescriptor Class Reference

#include <ConvertStandardToLLVM.h>

Inheritance diagram for mlir::MemRefDescriptor:
Inheritance graph
[legend]
Collaboration diagram for mlir::MemRefDescriptor:
Collaboration graph
[legend]

Public Member Functions

 MemRefDescriptor (Value descriptor)
 Construct a helper for the given descriptor value. More...
 
Value allocatedPtr (OpBuilder &builder, Location loc)
 Builds IR extracting the allocated pointer from the descriptor. More...
 
void setAllocatedPtr (OpBuilder &builder, Location loc, Value ptr)
 Builds IR inserting the allocated pointer into the descriptor. More...
 
Value alignedPtr (OpBuilder &builder, Location loc)
 Builds IR extracting the aligned pointer from the descriptor. More...
 
void setAlignedPtr (OpBuilder &builder, Location loc, Value ptr)
 Builds IR inserting the aligned pointer into the descriptor. More...
 
Value offset (OpBuilder &builder, Location loc)
 Builds IR extracting the offset from the descriptor. More...
 
void setOffset (OpBuilder &builder, Location loc, Value offset)
 Builds IR inserting the offset into the descriptor. More...
 
void setConstantOffset (OpBuilder &builder, Location loc, uint64_t offset)
 Builds IR inserting the offset into the descriptor. More...
 
Value size (OpBuilder &builder, Location loc, unsigned pos)
 Builds IR extracting the pos-th size from the descriptor. More...
 
void setSize (OpBuilder &builder, Location loc, unsigned pos, Value size)
 Builds IR inserting the pos-th size into the descriptor. More...
 
void setConstantSize (OpBuilder &builder, Location loc, unsigned pos, uint64_t size)
 Builds IR inserting the pos-th size into the descriptor. More...
 
Value stride (OpBuilder &builder, Location loc, unsigned pos)
 Builds IR extracting the pos-th size from the descriptor. More...
 
void setStride (OpBuilder &builder, Location loc, unsigned pos, Value stride)
 Builds IR inserting the pos-th stride into the descriptor. More...
 
void setConstantStride (OpBuilder &builder, Location loc, unsigned pos, uint64_t stride)
 Builds IR inserting the pos-th stride into the descriptor. More...
 
LLVM::LLVMType getElementType ()
 Returns the (LLVM) type this descriptor points to. More...
 
- Public Member Functions inherited from mlir::StructBuilder
 StructBuilder (Value v)
 Construct a helper for the given value. More...
 
 operator Value ()
 

Static Public Member Functions

static MemRefDescriptor undef (OpBuilder &builder, Location loc, Type descriptorType)
 Builds IR creating an undef value of the descriptor type. More...
 
static MemRefDescriptor fromStaticShape (OpBuilder &builder, Location loc, LLVMTypeConverter &typeConverter, MemRefType type, Value memory)
 
- Static Public Member Functions inherited from mlir::StructBuilder
static StructBuilder undef (OpBuilder &builder, Location loc, Type descriptorType)
 Builds IR creating an undef value of the descriptor type. More...
 

Additional Inherited Members

- Protected Member Functions inherited from mlir::StructBuilder
Value extractPtr (OpBuilder &builder, Location loc, unsigned pos)
 Builds IR to extract a value from the struct at position pos. More...
 
void setPtr (OpBuilder &builder, Location loc, unsigned pos, Value ptr)
 Builds IR to set a value in the struct at position pos. More...
 
- Protected Attributes inherited from mlir::StructBuilder
Value value
 
Type structType
 

Detailed Description

Helper class to produce LLVM dialect operations extracting or inserting elements of a MemRef descriptor. Wraps a Value pointing to the descriptor. The Value may be null, in which case none of the operations are valid.

Constructor & Destructor Documentation

◆ MemRefDescriptor()

MemRefDescriptor::MemRefDescriptor ( Value  descriptor)
explicit

Construct a helper for the given descriptor value.

Member Function Documentation

◆ alignedPtr()

Value MemRefDescriptor::alignedPtr ( OpBuilder builder,
Location  loc 
)

Builds IR extracting the aligned pointer from the descriptor.

◆ allocatedPtr()

Value MemRefDescriptor::allocatedPtr ( OpBuilder builder,
Location  loc 
)

Builds IR extracting the allocated pointer from the descriptor.

◆ fromStaticShape()

MemRefDescriptor MemRefDescriptor::fromStaticShape ( OpBuilder builder,
Location  loc,
LLVMTypeConverter typeConverter,
MemRefType  type,
Value  memory 
)
static

Builds IR creating a MemRef descriptor that represents type and populates it with static shape and stride information extracted from the type.

◆ getElementType()

LLVM::LLVMType MemRefDescriptor::getElementType ( )

Returns the (LLVM) type this descriptor points to.

◆ offset()

Value MemRefDescriptor::offset ( OpBuilder builder,
Location  loc 
)

Builds IR extracting the offset from the descriptor.

◆ setAlignedPtr()

void MemRefDescriptor::setAlignedPtr ( OpBuilder builder,
Location  loc,
Value  ptr 
)

Builds IR inserting the aligned pointer into the descriptor.

◆ setAllocatedPtr()

void MemRefDescriptor::setAllocatedPtr ( OpBuilder builder,
Location  loc,
Value  ptr 
)

Builds IR inserting the allocated pointer into the descriptor.

◆ setConstantOffset()

void MemRefDescriptor::setConstantOffset ( OpBuilder builder,
Location  loc,
uint64_t  offset 
)

Builds IR inserting the offset into the descriptor.

◆ setConstantSize()

void MemRefDescriptor::setConstantSize ( OpBuilder builder,
Location  loc,
unsigned  pos,
uint64_t  size 
)

Builds IR inserting the pos-th size into the descriptor.

◆ setConstantStride()

void MemRefDescriptor::setConstantStride ( OpBuilder builder,
Location  loc,
unsigned  pos,
uint64_t  stride 
)

Builds IR inserting the pos-th stride into the descriptor.

◆ setOffset()

void MemRefDescriptor::setOffset ( OpBuilder builder,
Location  loc,
Value  offset 
)

Builds IR inserting the offset into the descriptor.

◆ setSize()

void MemRefDescriptor::setSize ( OpBuilder builder,
Location  loc,
unsigned  pos,
Value  size 
)

Builds IR inserting the pos-th size into the descriptor.

◆ setStride()

void MemRefDescriptor::setStride ( OpBuilder builder,
Location  loc,
unsigned  pos,
Value  stride 
)

Builds IR inserting the pos-th stride into the descriptor.

◆ size()

Value MemRefDescriptor::size ( OpBuilder builder,
Location  loc,
unsigned  pos 
)

Builds IR extracting the pos-th size from the descriptor.

◆ stride()

Value MemRefDescriptor::stride ( OpBuilder builder,
Location  loc,
unsigned  pos 
)

Builds IR extracting the pos-th size from the descriptor.

◆ undef()

MemRefDescriptor MemRefDescriptor::undef ( OpBuilder builder,
Location  loc,
Type  descriptorType 
)
static

Builds IR creating an undef value of the descriptor type.


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