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

#include <AffineOps.h>

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

Public Member Functions

unsigned getSrcMemRefOperandIndex ()
 Returns the operand index of the src memref. More...
 
Value getSrcMemRef ()
 Returns the source MemRefType for this DMA operation. More...
 
MemRefType getSrcMemRefType ()
 
unsigned getSrcMemRefRank ()
 Returns the rank (number of indices) of the source MemRefType. More...
 
AffineMap getSrcMap ()
 Returns the affine map used to access the src memref. More...
 
AffineMapAttr getSrcMapAttr ()
 
operand_range getSrcIndices ()
 Returns the source memref affine map indices for this DMA operation. More...
 
unsigned getSrcMemorySpace ()
 Returns the memory space of the src memref. More...
 
unsigned getDstMemRefOperandIndex ()
 Returns the operand index of the dst memref. More...
 
Value getDstMemRef ()
 Returns the destination MemRefType for this DMA operations. More...
 
MemRefType getDstMemRefType ()
 
unsigned getDstMemRefRank ()
 Returns the rank (number of indices) of the destination MemRefType. More...
 
unsigned getDstMemorySpace ()
 Returns the memory space of the src memref. More...
 
AffineMap getDstMap ()
 Returns the affine map used to access the dst memref. More...
 
AffineMapAttr getDstMapAttr ()
 
operand_range getDstIndices ()
 Returns the destination memref indices for this DMA operation. More...
 
unsigned getTagMemRefOperandIndex ()
 Returns the operand index of the tag memref. More...
 
Value getTagMemRef ()
 Returns the Tag MemRef for this DMA operation. More...
 
MemRefType getTagMemRefType ()
 
unsigned getTagMemRefRank ()
 Returns the rank (number of indices) of the tag MemRefType. More...
 
AffineMap getTagMap ()
 Returns the affine map used to access the tag memref. More...
 
AffineMapAttr getTagMapAttr ()
 
operand_range getTagIndices ()
 Returns the tag memref indices for this DMA operation. More...
 
Value getNumElements ()
 Returns the number of elements being transferred by this DMA operation. More...
 
NamedAttribute getAffineMapAttrForMemRef (Value memref)
 Returns the AffineMapAttr associated with 'memref'. More...
 
bool isDestMemorySpaceFaster ()
 Returns true if this is a DMA from a faster memory space to a slower one. More...
 
bool isSrcMemorySpaceFaster ()
 Returns true if this is a DMA from a slower memory space to a faster one. More...
 
unsigned getFasterMemPos ()
 
void print (OpAsmPrinter &p)
 
LogicalResult verify ()
 
LogicalResult fold (ArrayRef< Attribute > cstOperands, SmallVectorImpl< OpFoldResult > &results)
 
bool isStrided ()
 Returns true if this DMA operation is strided, returns false otherwise. More...
 
Value getStride ()
 Returns the stride value for this DMA operation. More...
 
Value getNumElementsPerStride ()
 Returns the number of elements to transfer per stride for this DMA op. More...
 
- Public Member Functions inherited from mlir::Op< AffineDmaStartOp, OpTrait::VariadicOperands, OpTrait::ZeroResult >
OperationgetOperation ()
 Return the operation that this refers to. More...
 
AffineDmaStartOp clone ()
 Create a deep copy of this operation. More...
 
AffineDmaStartOp cloneWithoutRegions ()
 
DialectgetDialect ()
 Return the dialect that this refers to. More...
 
RegiongetParentRegion ()
 Return the parent Region of this operation. More...
 
 Op ()
 This is a public constructor. Any op can be initialized to null. More...
 
 Op (std::nullptr_t)
 
 Op (Operation *state)
 
const void * getAsOpaquePointer () const
 Methods for supporting PointerLikeTypeTraits. More...
 
- Public Member Functions inherited from mlir::OpState
 operator bool ()
 Ops are pointer-like, so we allow implicit conversion to bool. More...
 
 operator Operation * () const
 This implicitly converts to Operation*. More...
 
OperationgetOperation ()
 Return the operation that this refers to. More...
 
OperationgetParentOp ()
 
template<typename OpTy >
OpTy getParentOfType ()
 Return the closest surrounding parent operation that is of type 'OpTy'. More...
 
MLIRContextgetContext ()
 Return the context this operation belongs to. More...
 
void print (raw_ostream &os, OpPrintingFlags flags=llvm::None)
 Print the operation to the given stream. More...
 
void dump ()
 Dump this operation. More...
 
Location getLoc ()
 The source location the operation was defined or derived from. More...
 
void setLoc (Location loc)
 
ArrayRef< NamedAttributegetAttrs ()
 Return all of the attributes on this operation. More...
 
dialect_attr_range getDialectAttrs ()
 Return a range corresponding to the dialect attributes for this operation. More...
 
dialect_attr_iterator dialect_attr_begin ()
 
dialect_attr_iterator dialect_attr_end ()
 
Attribute getAttr (StringRef name)
 Return an attribute with the specified name. More...
 
template<typename AttrClass >
AttrClass getAttrOfType (StringRef name)
 If the operation has an attribute of the specified type, return it. More...
 
void setAttr (Identifier name, Attribute value)
 
void setAttr (StringRef name, Attribute value)
 
void setAttrs (ArrayRef< NamedAttribute > attributes)
 Set the attributes held by this operation. More...
 
void setAttrs (NamedAttributeList newAttrs)
 
template<typename DialectAttrs >
void setDialectAttrs (DialectAttrs &&attrs)
 Set the dialect attributes for this operation, and preserve all dependent. More...
 
NamedAttributeList::RemoveResult removeAttr (Identifier name)
 
NamedAttributeList::RemoveResult removeAttr (StringRef name)
 
bool use_empty ()
 Return true if there are no users of any results of this operation. More...
 
void erase ()
 Remove this operation from its parent block and delete it. More...
 
InFlightDiagnostic emitOpError (const Twine &message={})
 
InFlightDiagnostic emitError (const Twine &message={})
 
InFlightDiagnostic emitWarning (const Twine &message={})
 
InFlightDiagnostic emitRemark (const Twine &message={})
 
template<typename FnT , typename RetT = detail::walkResultType<FnT>>
RetT walk (FnT &&callback)
 
- Public Member Functions inherited from mlir::OpTrait::detail::MultiOperandTraitBase< AffineDmaStartOp, VariadicOperands >
unsigned getNumOperands ()
 Return the number of operands. More...
 
Value getOperand (unsigned i)
 Return the operand at index 'i'. More...
 
void setOperand (unsigned i, Value value)
 Set the operand at index 'i' to 'value'. More...
 
operand_iterator operand_begin ()
 Operand iterator access. More...
 
operand_iterator operand_end ()
 
operand_range getOperands ()
 
operand_type_iterator operand_type_begin ()
 Operand type access. More...
 
operand_type_iterator operand_type_end ()
 
operand_type_range getOperandTypes ()
 
- Public Member Functions inherited from mlir::FoldingHook< AffineDmaStartOp, llvm::is_one_of< OpTrait::OneResult< AffineDmaStartOp >, OpTrait::VariadicOperands< AffineDmaStartOp >... >::value >
LogicalResult fold (ArrayRef< Attribute > operands, SmallVectorImpl< OpFoldResult > &results)
 

Static Public Member Functions

static void build (Builder *builder, OperationState &result, Value srcMemRef, AffineMap srcMap, ValueRange srcIndices, Value destMemRef, AffineMap dstMap, ValueRange destIndices, Value tagMemRef, AffineMap tagMap, ValueRange tagIndices, Value numElements, Value stride=nullptr, Value elementsPerStride=nullptr)
 
static StringRef getSrcMapAttrName ()
 
static StringRef getDstMapAttrName ()
 
static StringRef getTagMapAttrName ()
 
static StringRef getOperationName ()
 
static ParseResult parse (OpAsmParser &parser, OperationState &result)
 
- Static Public Member Functions inherited from mlir::Op< AffineDmaStartOp, OpTrait::VariadicOperands, OpTrait::ZeroResult >
static constexpr bool hasTrait ()
 Return if this operation contains the provided trait. More...
 
static bool classof (Operation *op)
 Return true if this "op class" can match against the specified operation. More...
 
static ParseResult parseAssembly (OpAsmParser &parser, OperationState &result)
 
static void printAssembly (Operation *op, OpAsmPrinter &p)
 
static LogicalResult verifyInvariants (Operation *op)
 
static AbstractOperation::OperationProperties getOperationProperties ()
 
static ConcreteOpType getFromOpaquePointer (const void *pointer)
 
- Static Public Member Functions inherited from mlir::OpState
static void getCanonicalizationPatterns (OwningRewritePatternList &results, MLIRContext *context)
 
- Static Public Member Functions inherited from mlir::FoldingHook< AffineDmaStartOp, llvm::is_one_of< OpTrait::OneResult< AffineDmaStartOp >, OpTrait::VariadicOperands< AffineDmaStartOp >... >::value >
static LogicalResult foldHook (Operation *op, ArrayRef< Attribute > operands, SmallVectorImpl< OpFoldResult > &results)
 

Additional Inherited Members

- Public Types inherited from mlir::Op< AffineDmaStartOp, OpTrait::VariadicOperands, OpTrait::ZeroResult >
using ConcreteOpType = AffineDmaStartOp
 
- Public Types inherited from mlir::OpState
using dialect_attr_iterator = Operation::dialect_attr_iterator
 A utility iterator that filters out non-dialect attributes. More...
 
using dialect_attr_range = Operation::dialect_attr_range
 
- Public Types inherited from mlir::OpTrait::detail::MultiOperandTraitBase< AffineDmaStartOp, VariadicOperands >
using operand_iterator = Operation::operand_iterator
 
using operand_range = Operation::operand_range
 
using operand_type_iterator = Operation::operand_type_iterator
 
using operand_type_range = Operation::operand_type_range
 
- Protected Member Functions inherited from mlir::OpState
LogicalResult verify ()
 
void print (OpAsmPrinter &p)
 
 OpState (Operation *state)
 
- Protected Member Functions inherited from mlir::OpTrait::TraitBase< AffineDmaStartOp, VariadicOperands >
OperationgetOperation ()
 Return the ultimate Operation being worked on. More...
 
- Static Protected Member Functions inherited from mlir::OpState
static ParseResult parse (OpAsmParser &parser, OperationState &result)
 
- Static Protected Member Functions inherited from mlir::OpTrait::TraitBase< AffineDmaStartOp, VariadicOperands >
static LogicalResult verifyTrait (Operation *op)
 
static AbstractOperation::OperationProperties getTraitProperties ()
 

Detailed Description

AffineDmaStartOp starts a non-blocking DMA operation that transfers data from a source memref to a destination memref. The source and destination memref need not be of the same dimensionality, but need to have the same elemental type. The operands include the source and destination memref's each followed by its indices, size of the data transfer in terms of the number of elements (of the elemental type of the memref), a tag memref with its indices, and optionally at the end, a stride and a number_of_elements_per_stride arguments. The tag location is used by an AffineDmaWaitOp to check for completion. The indices of the source memref, destination memref, and the tag memref have the same restrictions as any affine.load/store. In particular, index for each memref dimension must be an affine expression of loop induction variables and symbols. The optional stride arguments should be of 'index' type, and specify a stride for the slower memory space (memory space with a lower memory space id), transferring chunks of number_of_elements_per_stride every stride until num_elements are transferred. Either both or no stride arguments should be specified. The value of 'num_elements' must be a multiple of 'number_of_elements_per_stride'.

Member Function Documentation

◆ build()

void AffineDmaStartOp::build ( Builder builder,
OperationState result,
Value  srcMemRef,
AffineMap  srcMap,
ValueRange  srcIndices,
Value  destMemRef,
AffineMap  dstMap,
ValueRange  destIndices,
Value  tagMemRef,
AffineMap  tagMap,
ValueRange  tagIndices,
Value  numElements,
Value  stride = nullptr,
Value  elementsPerStride = nullptr 
)
static

◆ fold()

LogicalResult AffineDmaStartOp::fold ( ArrayRef< Attribute cstOperands,
SmallVectorImpl< OpFoldResult > &  results 
)

dma_start(memrefcast) -> dma_start

◆ getAffineMapAttrForMemRef()

NamedAttribute mlir::AffineDmaStartOp::getAffineMapAttrForMemRef ( Value  memref)
inline

Returns the AffineMapAttr associated with 'memref'.

◆ getDstIndices()

operand_range mlir::AffineDmaStartOp::getDstIndices ( )
inline

Returns the destination memref indices for this DMA operation.

◆ getDstMap()

AffineMap mlir::AffineDmaStartOp::getDstMap ( )
inline

Returns the affine map used to access the dst memref.

◆ getDstMapAttr()

AffineMapAttr mlir::AffineDmaStartOp::getDstMapAttr ( )
inline

◆ getDstMapAttrName()

static StringRef mlir::AffineDmaStartOp::getDstMapAttrName ( )
inlinestatic

◆ getDstMemorySpace()

unsigned mlir::AffineDmaStartOp::getDstMemorySpace ( )
inline

Returns the memory space of the src memref.

◆ getDstMemRef()

Value mlir::AffineDmaStartOp::getDstMemRef ( )
inline

Returns the destination MemRefType for this DMA operations.

◆ getDstMemRefOperandIndex()

unsigned mlir::AffineDmaStartOp::getDstMemRefOperandIndex ( )
inline

Returns the operand index of the dst memref.

◆ getDstMemRefRank()

unsigned mlir::AffineDmaStartOp::getDstMemRefRank ( )
inline

Returns the rank (number of indices) of the destination MemRefType.

◆ getDstMemRefType()

MemRefType mlir::AffineDmaStartOp::getDstMemRefType ( )
inline

◆ getFasterMemPos()

unsigned mlir::AffineDmaStartOp::getFasterMemPos ( )
inline

Given a DMA start operation, returns the operand position of either the source or destination memref depending on the one that is at the higher level of the memory hierarchy. Asserts failure if neither is true.

◆ getNumElements()

Value mlir::AffineDmaStartOp::getNumElements ( )
inline

Returns the number of elements being transferred by this DMA operation.

◆ getNumElementsPerStride()

Value mlir::AffineDmaStartOp::getNumElementsPerStride ( )
inline

Returns the number of elements to transfer per stride for this DMA op.

◆ getOperationName()

static StringRef mlir::AffineDmaStartOp::getOperationName ( )
inlinestatic

◆ getSrcIndices()

operand_range mlir::AffineDmaStartOp::getSrcIndices ( )
inline

Returns the source memref affine map indices for this DMA operation.

◆ getSrcMap()

AffineMap mlir::AffineDmaStartOp::getSrcMap ( )
inline

Returns the affine map used to access the src memref.

◆ getSrcMapAttr()

AffineMapAttr mlir::AffineDmaStartOp::getSrcMapAttr ( )
inline

◆ getSrcMapAttrName()

static StringRef mlir::AffineDmaStartOp::getSrcMapAttrName ( )
inlinestatic

◆ getSrcMemorySpace()

unsigned mlir::AffineDmaStartOp::getSrcMemorySpace ( )
inline

Returns the memory space of the src memref.

◆ getSrcMemRef()

Value mlir::AffineDmaStartOp::getSrcMemRef ( )
inline

Returns the source MemRefType for this DMA operation.

◆ getSrcMemRefOperandIndex()

unsigned mlir::AffineDmaStartOp::getSrcMemRefOperandIndex ( )
inline

Returns the operand index of the src memref.

◆ getSrcMemRefRank()

unsigned mlir::AffineDmaStartOp::getSrcMemRefRank ( )
inline

Returns the rank (number of indices) of the source MemRefType.

◆ getSrcMemRefType()

MemRefType mlir::AffineDmaStartOp::getSrcMemRefType ( )
inline

◆ getStride()

Value mlir::AffineDmaStartOp::getStride ( )
inline

Returns the stride value for this DMA operation.

◆ getTagIndices()

operand_range mlir::AffineDmaStartOp::getTagIndices ( )
inline

Returns the tag memref indices for this DMA operation.

◆ getTagMap()

AffineMap mlir::AffineDmaStartOp::getTagMap ( )
inline

Returns the affine map used to access the tag memref.

◆ getTagMapAttr()

AffineMapAttr mlir::AffineDmaStartOp::getTagMapAttr ( )
inline

◆ getTagMapAttrName()

static StringRef mlir::AffineDmaStartOp::getTagMapAttrName ( )
inlinestatic

◆ getTagMemRef()

Value mlir::AffineDmaStartOp::getTagMemRef ( )
inline

Returns the Tag MemRef for this DMA operation.

◆ getTagMemRefOperandIndex()

unsigned mlir::AffineDmaStartOp::getTagMemRefOperandIndex ( )
inline

Returns the operand index of the tag memref.

◆ getTagMemRefRank()

unsigned mlir::AffineDmaStartOp::getTagMemRefRank ( )
inline

Returns the rank (number of indices) of the tag MemRefType.

◆ getTagMemRefType()

MemRefType mlir::AffineDmaStartOp::getTagMemRefType ( )
inline

◆ isDestMemorySpaceFaster()

bool mlir::AffineDmaStartOp::isDestMemorySpaceFaster ( )
inline

Returns true if this is a DMA from a faster memory space to a slower one.

◆ isSrcMemorySpaceFaster()

bool mlir::AffineDmaStartOp::isSrcMemorySpaceFaster ( )
inline

Returns true if this is a DMA from a slower memory space to a faster one.

◆ isStrided()

bool mlir::AffineDmaStartOp::isStrided ( )
inline

Returns true if this DMA operation is strided, returns false otherwise.

◆ parse()

ParseResult AffineDmaStartOp::parse ( OpAsmParser parser,
OperationState result 
)
static

◆ print()

void AffineDmaStartOp::print ( OpAsmPrinter p)

◆ verify()

LogicalResult AffineDmaStartOp::verify ( )

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