MLIR  20.0.0git
Public Member Functions | Static Public Member Functions | List of all members
mlir::affine::AffineDmaWaitOp Class Reference

AffineDmaWaitOp blocks until the completion of a DMA operation associated with the tag element 'tag[index]'. More...

#include "mlir/Dialect/Affine/IR/AffineOps.h"

+ Inheritance diagram for mlir::affine::AffineDmaWaitOp:

Public Member Functions

Value getTagMemRef ()
 Returns the Tag MemRef associated with the DMA operation being waited on. More...
 
OpOperandgetTagMemRefMutable ()
 
MemRefType getTagMemRefType ()
 
AffineMap getTagMap ()
 Returns the affine map used to access the tag memref. More...
 
AffineMapAttr getTagMapAttr ()
 
operand_range getTagIndices ()
 Returns the tag memref index for this DMA operation. More...
 
unsigned getTagMemRefRank ()
 Returns the rank (number of indices) of the tag memref. More...
 
NamedAttribute getAffineMapAttrForMemRef (Value memref)
 Impelements the AffineMapAccessInterface. More...
 
Value getNumElements ()
 Returns the number of elements transferred by the associated DMA op. More...
 
void print (OpAsmPrinter &p)
 
LogicalResult verifyInvariantsImpl ()
 
LogicalResult verifyInvariants ()
 
LogicalResult fold (ArrayRef< Attribute > cstOperands, SmallVectorImpl< OpFoldResult > &results)
 
void getEffects (SmallVectorImpl< SideEffects::EffectInstance< MemoryEffects::Effect >> &effects)
 
 Op ()
 This is a public constructor. Any op can be initialized to null. More...
 
 Op (std::nullptr_t)
 
 Op (Operation *state)
 This is a public constructor to enable access via the llvm::cast family of methods. More...
 
- Public Member Functions inherited from mlir::Op< AffineDmaWaitOp, OpTrait::MemRefsNormalizable, OpTrait::VariadicOperands, OpTrait::ZeroResults, OpTrait::OpInvariants, AffineMapAccessInterface::Trait >
AffineDmaWaitOp clone ()
 Create a deep copy of this operation. More...
 
AffineDmaWaitOp cloneWithoutRegions ()
 Create a partial copy of this operation without traversing into attached regions. More...
 
 Op ()
 This is a public constructor. Any op can be initialized to null. More...
 
 Op (std::nullptr_t)
 
 Op (Operation *state)
 This is a public constructor to enable access via the llvm::cast family of methods. More...
 
const void * getAsOpaquePointer () const
 Methods for supporting PointerLikeTypeTraits. More...
 
InferredProperties< T > & getProperties ()
 
OperationgetOperation ()
 Inherit getOperation from OpState. More...
 
LogicalResult verify ()
 If the concrete type didn't implement a custom verifier hook, just fall back to this one which accepts everything. More...
 
LogicalResult verifyRegions ()
 
- Public Member Functions inherited from mlir::OpState
 operator bool ()
 Ops are pointer-like, so we allow conversion to bool. More...
 
 operator Operation * () const
 This implicitly converts to Operation*. More...
 
Operationoperator-> () const
 Shortcut of -> to access a member of Operation. More...
 
OperationgetOperation ()
 Return the operation that this refers to. More...
 
MLIRContextgetContext ()
 Return the context this operation belongs to. More...
 
void print (raw_ostream &os, OpPrintingFlags flags=std::nullopt)
 Print the operation to the given stream. More...
 
void print (raw_ostream &os, AsmState &asmState)
 
void dump ()
 Dump this operation. More...
 
Location getLoc ()
 The source location the operation was defined or derived from. More...
 
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={})
 Emit an error with the op name prefixed, like "'dim' op " which is convenient for verifiers. More...
 
InFlightDiagnostic emitError (const Twine &message={})
 Emit an error about fatal conditions with this operation, reporting up to any diagnostic handlers that may be listening. More...
 
InFlightDiagnostic emitWarning (const Twine &message={})
 Emit a warning about this operation, reporting up to any diagnostic handlers that may be listening. More...
 
InFlightDiagnostic emitRemark (const Twine &message={})
 Emit a remark about this operation, reporting up to any diagnostic handlers that may be listening. More...
 
template<WalkOrder Order = WalkOrder::PostOrder, typename Iterator = ForwardIterator, typename FnT , typename RetT = detail::walkResultType<FnT>>
std::enable_if_t< llvm::function_traits< std::decay_t< FnT > >::num_args==1, RetT > walk (FnT &&callback)
 Walk the operation by calling the callback for each nested operation (including this one), block or region, depending on the callback provided. More...
 
template<typename FnT , typename RetT = detail::walkResultType<FnT>>
std::enable_if_t< llvm::function_traits< std::decay_t< FnT > >::num_args==2, RetT > walk (FnT &&callback)
 Generic walker with a stage aware callback. More...
 

Static Public Member Functions

static ArrayRef< StringRef > getAttributeNames ()
 
static void build (OpBuilder &builder, OperationState &result, Value tagMemRef, AffineMap tagMap, ValueRange tagIndices, Value numElements)
 
static StringRef getOperationName ()
 
static StringRef getTagMapAttrStrName ()
 
static ParseResult parse (OpAsmParser &parser, OperationState &result)
 
- Static Public Member Functions inherited from mlir::Op< AffineDmaWaitOp, OpTrait::MemRefsNormalizable, OpTrait::VariadicOperands, OpTrait::ZeroResults, OpTrait::OpInvariants, AffineMapAccessInterface::Trait >
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 std::enable_if_t< std::is_base_of< OpState, T >::value, bool > classof (const T *op)
 Provide classof support for other OpBase derived classes, such as Interfaces. More...
 
static ConcreteOpType getFromOpaquePointer (const void *pointer)
 
static void attachInterface (MLIRContext &context)
 Attach the given models as implementations of the corresponding interfaces for the concrete operation. More...
 
static LogicalResult setPropertiesFromAttr (PropertiesTy &prop, Attribute attr, function_ref< InFlightDiagnostic()> emitError)
 Convert the provided attribute to a property and assigned it to the provided properties. More...
 
static Attribute getPropertiesAsAttr (MLIRContext *ctx, const PropertiesTy &prop)
 Convert the provided properties to an attribute. More...
 
static llvm::hash_code computePropertiesHash (const PropertiesTy &prop)
 Hash the provided properties. More...
 
static constexpr bool hasProperties ()
 Returns true if this operation defines a Properties inner type. More...
 
static void populateDefaultProperties (OperationName opName, InferredProperties< T > &properties)
 This hook populates any unset default attrs when mapped to properties. More...
 
static void printProperties (MLIRContext *ctx, OpAsmPrinter &p, const T &properties, ArrayRef< StringRef > elidedProps={})
 Print the operation properties with names not included within 'elidedProps'. More...
 
static ParseResult parseProperties (OpAsmParser &parser, OperationState &result)
 Parses 'prop-dict' for the operation. More...
 
- Static Public Member Functions inherited from mlir::OpState
static void getCanonicalizationPatterns (RewritePatternSet &results, MLIRContext *context)
 This hook returns any canonicalization pattern rewrites that the operation supports, for use by the canonicalization pass. More...
 
static void populateDefaultAttrs (const OperationName &, NamedAttrList &)
 This hook populates any unset default attrs. More...
 

Additional Inherited Members

- Public Types inherited from mlir::Op< AffineDmaWaitOp, OpTrait::MemRefsNormalizable, OpTrait::VariadicOperands, OpTrait::ZeroResults, OpTrait::OpInvariants, AffineMapAccessInterface::Trait >
using ConcreteOpType = AffineDmaWaitOp
 Expose the type we are instantiated on to template machinery that may want to introspect traits on this operation. More...
 
using InferredProperties = typename PropertiesSelector< T >::type
 
- Protected Member Functions inherited from mlir::OpState
LogicalResult verify ()
 If the concrete type didn't implement a custom verifier hook, just fall back to this one which accepts everything. More...
 
LogicalResult verifyRegions ()
 
 OpState (Operation *state)
 Mutability management is handled by the OpWrapper/OpConstWrapper classes, so we can cast it away here. More...
 
- Protected Member Functions inherited from mlir::OpTrait::TraitBase< ConcreteType, TraitType >
OperationgetOperation ()
 Return the ultimate Operation being worked on. More...
 
- Static Protected Member Functions inherited from mlir::OpState
static ParseResult parse (OpAsmParser &parser, OperationState &result)
 Parse the custom form of an operation. More...
 
static void print (Operation *op, OpAsmPrinter &p, StringRef defaultDialect)
 Print the operation. More...
 
static ParseResult genericParseProperties (OpAsmParser &parser, Attribute &result)
 Parse properties as a Attribute. More...
 
static void genericPrintProperties (OpAsmPrinter &p, Attribute properties, ArrayRef< StringRef > elidedProps={})
 Print the properties as a Attribute with names not included within 'elidedProps'. More...
 
static void printOpName (Operation *op, OpAsmPrinter &p, StringRef defaultDialect)
 Print an operation name, eliding the dialect prefix if necessary. More...
 
static EmptyPropertiesgetEmptyProperties ()
 For all op which don't have properties, we keep a single instance of EmptyProperties to be used where a reference to a properties is needed: this allow to bind a pointer to the reference without triggering UB. More...
 

Detailed Description

AffineDmaWaitOp blocks until the completion of a DMA operation associated with the tag element 'tag[index]'.

tag is a memref, and index has to be an index with the same restrictions as any load/store index. In particular, index for each memref dimension must be an affine expression of loop induction variables and symbols. num_elements is the number of elements associated with the DMA operation. For example:

Definition at line 300 of file AffineOps.h.

Member Function Documentation

◆ build()

void AffineDmaWaitOp::build ( OpBuilder builder,
OperationState result,
Value  tagMemRef,
AffineMap  tagMap,
ValueRange  tagIndices,
Value  numElements 
)
static

◆ fold()

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

dma_wait(memrefcast) -> dma_wait

Definition at line 1793 of file AffineOps.cpp.

References mlir::memref::foldMemRefCast().

◆ getAffineMapAttrForMemRef()

NamedAttribute mlir::affine::AffineDmaWaitOp::getAffineMapAttrForMemRef ( Value  memref)
inline

Impelements the AffineMapAccessInterface.

Returns the AffineMapAttr associated with 'memref'.

Definition at line 340 of file AffineOps.h.

References mlir::get(), mlir::OpState::getContext(), getTagMapAttr(), getTagMapAttrStrName(), and getTagMemRef().

◆ getAttributeNames()

static ArrayRef<StringRef> mlir::affine::AffineDmaWaitOp::getAttributeNames ( )
inlinestatic

Definition at line 306 of file AffineOps.h.

◆ getEffects()

void AffineDmaWaitOp::getEffects ( SmallVectorImpl< SideEffects::EffectInstance< MemoryEffects::Effect >> &  effects)

◆ getNumElements()

Value mlir::affine::AffineDmaWaitOp::getNumElements ( )
inline

Returns the number of elements transferred by the associated DMA op.

Definition at line 347 of file AffineOps.h.

References getTagMap().

◆ getOperationName()

static StringRef mlir::affine::AffineDmaWaitOp::getOperationName ( )
inlinestatic

Definition at line 311 of file AffineOps.h.

◆ getTagIndices()

operand_range mlir::affine::AffineDmaWaitOp::getTagIndices ( )
inline

Returns the tag memref index for this DMA operation.

Definition at line 328 of file AffineOps.h.

References mlir::AffineMap::getNumInputs(), and getTagMap().

Referenced by checkTagMatch().

◆ getTagMap()

AffineMap mlir::affine::AffineDmaWaitOp::getTagMap ( )
inline

Returns the affine map used to access the tag memref.

Definition at line 321 of file AffineOps.h.

References getTagMapAttr().

Referenced by getNumElements(), and getTagIndices().

◆ getTagMapAttr()

AffineMapAttr mlir::affine::AffineDmaWaitOp::getTagMapAttr ( )
inline

Definition at line 322 of file AffineOps.h.

References getTagMapAttrStrName().

Referenced by getAffineMapAttrForMemRef(), and getTagMap().

◆ getTagMapAttrStrName()

static StringRef mlir::affine::AffineDmaWaitOp::getTagMapAttrStrName ( )
inlinestatic

Definition at line 349 of file AffineOps.h.

Referenced by getAffineMapAttrForMemRef(), and getTagMapAttr().

◆ getTagMemRef()

Value mlir::affine::AffineDmaWaitOp::getTagMemRef ( )
inline

Returns the Tag MemRef associated with the DMA operation being waited on.

Definition at line 314 of file AffineOps.h.

Referenced by checkTagMatch(), getAffineMapAttrForMemRef(), getTagMemRefRank(), and getTagMemRefType().

◆ getTagMemRefMutable()

OpOperand& mlir::affine::AffineDmaWaitOp::getTagMemRefMutable ( )
inline

◆ getTagMemRefRank()

unsigned mlir::affine::AffineDmaWaitOp::getTagMemRefRank ( )
inline

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

Definition at line 334 of file AffineOps.h.

References getTagMemRef(), and mlir::getType().

◆ getTagMemRefType()

MemRefType mlir::affine::AffineDmaWaitOp::getTagMemRefType ( )
inline

Definition at line 316 of file AffineOps.h.

References getTagMemRef(), and mlir::getType().

◆ Op() [1/3]

mlir::Op< ConcreteType, Traits >::Op
inlineexplicit

This is a public constructor. Any op can be initialized to null.

Definition at line 1713 of file OpDefinition.h.

◆ Op() [2/3]

mlir::Op< ConcreteType, Traits >::Op
inlineexplicit

This is a public constructor to enable access via the llvm::cast family of methods.

This should not be used directly.

Definition at line 1718 of file OpDefinition.h.

◆ Op() [3/3]

mlir::Op< ConcreteType, Traits >::Op
inline

Definition at line 1714 of file OpDefinition.h.

◆ parse()

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

◆ print()

void AffineDmaWaitOp::print ( OpAsmPrinter p)

◆ verifyInvariants()

LogicalResult mlir::affine::AffineDmaWaitOp::verifyInvariants ( )
inline

Definition at line 353 of file AffineOps.h.

References verifyInvariantsImpl().

◆ verifyInvariantsImpl()

LogicalResult AffineDmaWaitOp::verifyInvariantsImpl ( )

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