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

#include <AffineOps.h>

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

Public Member Functions

unsigned getMemRefOperandIndex ()
 Returns the operand index of the memref. More...
 
Value getMemRef ()
 Get memref operand. More...
 
void setMemRef (Value value)
 
MemRefType getMemRefType ()
 
operand_range getMapOperands ()
 Get affine map operands. More...
 
AffineMap getAffineMap ()
 Returns the affine map used to index the memref for this operation. More...
 
AffineMapAttr getAffineMapAttr ()
 
NamedAttribute getAffineMapAttrForMemRef (Value memref)
 Returns the AffineMapAttr associated with 'memref'. More...
 
void print (OpAsmPrinter &p)
 
LogicalResult verify ()
 
OpFoldResult fold (ArrayRef< Attribute > operands)
 
- Public Member Functions inherited from mlir::Op< AffineLoadOp, OpTrait::OneResult, OpTrait::AtLeastNOperands< 1 >::Impl >
OperationgetOperation ()
 Return the operation that this refers to. More...
 
AffineLoadOp clone ()
 Create a deep copy of this operation. More...
 
AffineLoadOp 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::OneResult< AffineLoadOp >
Value getResult ()
 
Type getType ()
 
void replaceAllUsesWith (Value newValue)
 
void replaceAllUsesWith (Operation *op)
 Replace all uses of 'this' value with the result of 'op'. More...
 
- Public Member Functions inherited from mlir::FoldingHook< AffineLoadOp, llvm::is_one_of< OpTrait::OneResult< AffineLoadOp >, OpTrait::OneResult< AffineLoadOp >... >::value >
LogicalResult fold (ArrayRef< Attribute > operands, SmallVectorImpl< OpFoldResult > &results)
 

Static Public Member Functions

static void build (Builder *builder, OperationState &result, AffineMap map, ValueRange operands)
 Builds an affine load op with the specified map and operands. More...
 
static void build (Builder *builder, OperationState &result, Value memref, ValueRange indices={})
 Builds an affine load op with an identity map and operands. More...
 
static void build (Builder *builder, OperationState &result, Value memref, AffineMap map, ValueRange mapOperands)
 Builds an affine load op with the specified map and its operands. More...
 
static StringRef getMapAttrName ()
 
static StringRef getOperationName ()
 
static ParseResult parse (OpAsmParser &parser, OperationState &result)
 
static void getCanonicalizationPatterns (OwningRewritePatternList &results, MLIRContext *context)
 
- Static Public Member Functions inherited from mlir::Op< AffineLoadOp, OpTrait::OneResult, OpTrait::AtLeastNOperands< 1 >::Impl >
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::OpTrait::OneResult< AffineLoadOp >
static LogicalResult verifyTrait (Operation *op)
 
- Static Public Member Functions inherited from mlir::FoldingHook< AffineLoadOp, llvm::is_one_of< OpTrait::OneResult< AffineLoadOp >, OpTrait::OneResult< AffineLoadOp >... >::value >
static LogicalResult foldHook (Operation *op, ArrayRef< Attribute > operands, SmallVectorImpl< OpFoldResult > &results)
 

Additional Inherited Members

- Public Types inherited from mlir::Op< AffineLoadOp, OpTrait::OneResult, OpTrait::AtLeastNOperands< 1 >::Impl >
using ConcreteOpType = AffineLoadOp
 
- 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
 
- Protected Member Functions inherited from mlir::OpState
LogicalResult verify ()
 
void print (OpAsmPrinter &p)
 
 OpState (Operation *state)
 
- Protected Member Functions inherited from mlir::OpTrait::TraitBase< AffineLoadOp, OneResult >
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< AffineLoadOp, OneResult >
static LogicalResult verifyTrait (Operation *op)
 
static AbstractOperation::OperationProperties getTraitProperties ()
 

Detailed Description

The "affine.load" op reads an element from a memref, where the index for each memref dimension is an affine expression of loop induction variables and symbols. The output of 'affine.load' is a new value with the same type as the elements of the memref. An affine expression of loop IVs and symbols must be specified for each dimension of the memref. The keyword 'symbol' can be used to indicate SSA identifiers which are symbolic.

Member Function Documentation

◆ build() [1/3]

void AffineLoadOp::build ( Builder builder,
OperationState result,
AffineMap  map,
ValueRange  operands 
)
static

Builds an affine load op with the specified map and operands.

◆ build() [2/3]

void AffineLoadOp::build ( Builder builder,
OperationState result,
Value  memref,
ValueRange  indices = {} 
)
static

Builds an affine load op with an identity map and operands.

◆ build() [3/3]

void AffineLoadOp::build ( Builder builder,
OperationState result,
Value  memref,
AffineMap  map,
ValueRange  mapOperands 
)
static

Builds an affine load op with the specified map and its operands.

◆ fold()

OpFoldResult AffineLoadOp::fold ( ArrayRef< Attribute operands)

load(memrefcast) -> load

◆ getAffineMap()

AffineMap mlir::AffineLoadOp::getAffineMap ( )
inline

Returns the affine map used to index the memref for this operation.

◆ getAffineMapAttr()

AffineMapAttr mlir::AffineLoadOp::getAffineMapAttr ( )
inline

◆ getAffineMapAttrForMemRef()

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

Returns the AffineMapAttr associated with 'memref'.

◆ getCanonicalizationPatterns()

void AffineLoadOp::getCanonicalizationPatterns ( OwningRewritePatternList results,
MLIRContext context 
)
static

◆ getMapAttrName()

static StringRef mlir::AffineLoadOp::getMapAttrName ( )
inlinestatic

◆ getMapOperands()

operand_range mlir::AffineLoadOp::getMapOperands ( )
inline

Get affine map operands.

◆ getMemRef()

Value mlir::AffineLoadOp::getMemRef ( )
inline

Get memref operand.

◆ getMemRefOperandIndex()

unsigned mlir::AffineLoadOp::getMemRefOperandIndex ( )
inline

Returns the operand index of the memref.

◆ getMemRefType()

MemRefType mlir::AffineLoadOp::getMemRefType ( )
inline

◆ getOperationName()

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

◆ parse()

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

◆ print()

void AffineLoadOp::print ( OpAsmPrinter p)

◆ setMemRef()

void mlir::AffineLoadOp::setMemRef ( Value  value)
inline

◆ verify()

LogicalResult AffineLoadOp::verify ( )

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