MLIR
15.0.0git
|
#include "mlir/Dialect/Affine/IR/AffineOps.h"
#include "mlir/Dialect/Affine/IR/AffineValueMap.h"
#include "mlir/Dialect/MemRef/IR/MemRef.h"
#include "mlir/Dialect/Tensor/IR/Tensor.h"
#include "mlir/IR/AffineExprVisitor.h"
#include "mlir/IR/BlockAndValueMapping.h"
#include "mlir/IR/IntegerSet.h"
#include "mlir/IR/Matchers.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/Transforms/InliningUtils.h"
#include "llvm/ADT/SmallBitVector.h"
#include "llvm/ADT/TypeSwitch.h"
#include "llvm/Support/Debug.h"
#include "mlir/Dialect/Affine/IR/AffineOpsDialect.cpp.inc"
#include "mlir/Dialect/Affine/IR/AffineOps.cpp.inc"
Go to the source code of this file.
Classes | |
struct | DeduplicateAffineMinMaxExpressions< T > |
Remove duplicated expressions in affine min/max ops. More... | |
struct | MergeAffineMinMaxOp< T > |
Merge an affine min/max op to its consumers if its consumer is also an affine min/max op. More... | |
struct | CanonicalizeAffineMinMaxOpExprAndTermOrder< T > |
Canonicalize the affine map result expression order of an affine min/max operation. More... | |
struct | CanonicalizeSingleResultAffineMinMaxOp< T > |
Macros | |
#define | DEBUG_TYPE "affine-analysis" |
#define | GET_OP_LIST |
#define | GET_OP_CLASSES |
Enumerations | |
enum | MinMaxKind |
Functions | |
static bool | remainsLegalAfterInline (Value value, Region *src, Region *dest, const BlockAndValueMapping &mapping, function_ref< bool(Value, Region *)> legalityCheck) |
Checks if value known to be a legal affine dimension or symbol in src region remains legal if the operation that uses it is inlined into dest with the given value mapping. More... | |
static bool | remainsLegalAfterInline (ValueRange values, Region *src, Region *dest, const BlockAndValueMapping &mapping, function_ref< bool(Value, Region *)> legalityCheck) |
Checks if all values known to be legal affine dimensions or symbols in src remain so if their respective users are inlined into dest . More... | |
template<typename OpTy > | |
static bool | remainsLegalAfterInline (OpTy op, Region *src, Region *dest, const BlockAndValueMapping &mapping) |
Checks if an affine read or write operation remains legal after inlining from src to dest . More... | |
template<> | |
bool LLVM_ATTRIBUTE_UNUSED | remainsLegalAfterInline (AffineApplyOp op, Region *src, Region *dest, const BlockAndValueMapping &mapping) |
Checks if an affine apply operation remains legal after inlining from src to dest . More... | |
template<typename AnyMemRefDefOp > | |
static bool | isMemRefSizeValidSymbol (AnyMemRefDefOp memrefDefOp, unsigned index, Region *region) |
Returns true if the 'index' dimension of the memref defined by memrefDefOp is a statically shaped one or defined using a valid symbol for region . More... | |
template<typename OpTy > | |
static bool | isDimOpValidSymbol (OpTy dimOp, Region *region) |
Returns true if the result of the dim op is a valid symbol for region . More... | |
static bool | isValidAffineIndexOperand (Value value, Region *region) |
static void | printDimAndSymbolList (Operation::operand_iterator begin, Operation::operand_iterator end, unsigned numDims, OpAsmPrinter &printer) |
Prints dimension and symbol list. More... | |
template<typename OpTy > | |
static LogicalResult | verifyDimAndSymbolIdentifiers (OpTy &op, Operation::operand_range operands, unsigned numDims) |
Utility function to verify that a set of operands are valid dimension and symbol identifiers. More... | |
static LogicalResult | replaceDimOrSym (AffineMap *map, unsigned dimOrSymbolPosition, SmallVectorImpl< Value > &dims, SmallVectorImpl< Value > &syms) |
Replace all occurrences of AffineExpr at position pos in map by the defining AffineApplyOp expression and operands. More... | |
static void | composeAffineMapAndOperands (AffineMap *map, SmallVectorImpl< Value > *operands) |
Iterate over operands and fold away all those produced by an AffineApplyOp iteratively. More... | |
static Value | createFoldedComposedAffineApply (OpBuilder &b, Location loc, AffineMap map, ValueRange operandsRef) |
Fully compose map with operands and canonicalize the result. More... | |
template<class MapOrSet > | |
static void | canonicalizePromotedSymbols (MapOrSet *mapOrSet, SmallVectorImpl< Value > *operands) |
template<class MapOrSet > | |
static void | canonicalizeMapOrSetAndOperands (MapOrSet *mapOrSet, SmallVectorImpl< Value > *operands) |
static LogicalResult | foldMemRefCast (Operation *op, Value ignore=nullptr) |
This is a common class used for patterns of the form "someop(memrefcast) -> someop". More... | |
static ParseResult | parseBound (bool isLower, OperationState &result, OpAsmParser &p) |
Parse a for operation loop bounds. More... | |
static void | printBound (AffineMapAttr boundMap, Operation::operand_range boundOperands, const char *prefix, OpAsmPrinter &p) |
static LogicalResult | foldLoopBounds (AffineForOp forOp) |
Fold the constant bounds of a loop. More... | |
static LogicalResult | canonicalizeLoopBounds (AffineForOp forOp) |
Canonicalize the bounds of the given loop. More... | |
static bool | hasTrivialZeroTripCount (AffineForOp op) |
Returns true if the affine.for has zero iterations in trivial cases. More... | |
template<typename BoundListTy , typename LoopCreatorTy > | |
static void | buildAffineLoopNestImpl (OpBuilder &builder, Location loc, BoundListTy lbs, BoundListTy ubs, ArrayRef< int64_t > steps, function_ref< void(OpBuilder &, Location, ValueRange)> bodyBuilderFn, LoopCreatorTy &&loopCreatorFn) |
Builds an affine loop nest, using "loopCreatorFn" to create individual loop operations. More... | |
static AffineForOp | buildAffineLoopFromConstants (OpBuilder &builder, Location loc, int64_t lb, int64_t ub, int64_t step, AffineForOp::BodyBuilderFn bodyBuilderFn) |
Creates an affine loop from the bounds known to be constants. More... | |
static AffineForOp | buildAffineLoopFromValues (OpBuilder &builder, Location loc, Value lb, Value ub, int64_t step, AffineForOp::BodyBuilderFn bodyBuilderFn) |
Creates an affine loop from the bounds that may or may not be constants. More... | |
static LogicalResult | verifyMemoryOpIndexing (Operation *op, AffineMapAttr mapAttr, Operation::operand_range mapOperands, MemRefType memrefType, unsigned numIndexOperands) |
Verify common indexing invariants of affine.load, affine.store, affine.vector_load and affine.vector_store. More... | |
template<typename T > | |
static LogicalResult | verifyAffineMinMaxOp (T op) |
template<typename T > | |
static void | printAffineMinMaxOp (OpAsmPrinter &p, T op) |
template<typename T > | |
static ParseResult | parseAffineMinMaxOp (OpAsmParser &parser, OperationState &result) |
template<typename T > | |
static OpFoldResult | foldMinMaxOp (T op, ArrayRef< Attribute > operands) |
Fold an affine min or max operation with the given operands. More... | |
static LogicalResult | canonicalizeMapExprAndTermOrder (AffineMap &map) |
Canonicalize the result expression order of an affine map and return success if the order changed. More... | |
static LogicalResult | canonicalizeLoopBounds (AffineParallelOp op) |
Canonicalize the bounds of the given loop. More... | |
static void | printMinMaxBound (OpAsmPrinter &p, AffineMapAttr mapAttr, DenseIntElementsAttr group, ValueRange operands, StringRef keyword) |
Prints a lower(upper) bound of an affine parallel loop with max(min) conditions in it. More... | |
static ParseResult | deduplicateAndResolveOperands (OpAsmParser &parser, ArrayRef< SmallVector< OpAsmParser::UnresolvedOperand >> operands, SmallVectorImpl< Value > &uniqueOperands, SmallVectorImpl< AffineExpr > &replacements, AffineExprKind kind) |
Given a list of lists of parsed operands, populates uniqueOperands with unique operands. More... | |
static ParseResult | parseAffineMapWithMinMax (OpAsmParser &parser, OperationState &result, MinMaxKind kind) |
Parses an affine map that can contain a min/max for groups of its results, e.g., max(expr-1, expr-2), expr-3, max(expr-4, expr-5, expr-6). More... | |
static LogicalResult | verifyVectorMemoryOp (Operation *op, MemRefType memrefType, VectorType vectorType) |
Verify common invariants of affine.vector_load and affine.vector_store. More... | |
#define DEBUG_TYPE "affine-analysis" |
Definition at line 25 of file AffineOps.cpp.
#define GET_OP_CLASSES |
Definition at line 3827 of file AffineOps.cpp.
#define GET_OP_LIST |
|
strong |
Definition at line 3413 of file AffineOps.cpp.
|
static |
Creates an affine loop from the bounds known to be constants.
Definition at line 2010 of file AffineOps.cpp.
References mlir::OpBuilder::create().
Referenced by buildAffineLoopFromValues(), and mlir::buildAffineLoopNest().
|
static |
Creates an affine loop from the bounds that may or may not be constants.
Definition at line 2019 of file AffineOps.cpp.
References buildAffineLoopFromConstants(), mlir::OpBuilder::create(), mlir::Value::getDefiningOp(), mlir::Builder::getDimIdentityMap(), and mlir::arith::ConstantIndexOp::value().
Referenced by mlir::buildAffineLoopNest().
|
static |
Builds an affine loop nest, using "loopCreatorFn" to create individual loop operations.
Definition at line 1969 of file AffineOps.cpp.
References mlir::OpBuilder::create(), and mlir::OpBuilder::setInsertionPointToStart().
Referenced by mlir::buildAffineLoopNest().
|
static |
Canonicalize the bounds of the given loop.
Definition at line 1631 of file AffineOps.cpp.
References mlir::RewritePatternSet::add(), mlir::canonicalizeMapAndOperands(), composeAffineMapAndOperands(), mlir::failure(), mlir::removeDuplicateExprs(), mlir::RewriterBase::replaceOp(), and mlir::success().
Referenced by canonicalizeLoopBounds(), and hasTrivialZeroTripCount().
|
static |
Canonicalize the bounds of the given loop.
Definition at line 3288 of file AffineOps.cpp.
References mlir::AffineValueMap::canonicalize(), canonicalizeLoopBounds(), mlir::failure(), mlir::AffineValueMap::getAffineMap(), mlir::AffineValueMap::getOperands(), mlir::succeeded(), and mlir::success().
|
static |
Canonicalize the result expression order of an affine map and return success if the order changed.
The function flattens the map's affine expressions to coefficient arrays and sorts them in lexicographic order. A coefficient array contains a multiplier for every dimension/symbol and a constant term. The canonicalization fails if a result expression is not pure or if the flattening requires local variables that, unlike dimensions and symbols, have no global order.
Definition at line 2775 of file AffineOps.cpp.
References mlir::failure(), mlir::AffineMap::getNumDims(), mlir::AffineMap::getNumResults(), mlir::AffineMap::getNumSymbols(), mlir::AffineMap::getResults(), and mlir::AffineExprVisitor< SubClass, RetTy >::walkPostOrder().
Referenced by CanonicalizeAffineMinMaxOpExprAndTermOrder< T >::matchAndRewrite().
|
static |
Definition at line 797 of file AffineOps.cpp.
References mlir::AffineExpr::dyn_cast(), mlir::getAffineConstantExpr(), mlir::getAffineDimExpr(), mlir::getAffineSymbolExpr(), mlir::m_Constant(), mlir::matchPattern(), and value.
|
static |
Definition at line 754 of file AffineOps.cpp.
References mlir::getAffineDimExpr(), mlir::getAffineSymbolExpr(), and mlir::isValidSymbol().
|
static |
Iterate over operands
and fold away all those produced by an AffineApplyOp iteratively.
Perform canonicalization of map and operands as well as AffineMap simplification. map
and operands
are mutated in place.
Definition at line 637 of file AffineOps.cpp.
References mlir::canonicalizeMapAndOperands(), mlir::detail::enumerate(), mlir::getAffineConstantExpr(), mlir::getAffineDimExpr(), mlir::getAffineSymbolExpr(), mlir::AffineMap::getContext(), mlir::AffineMap::getNumDims(), mlir::AffineMap::getNumResults(), mlir::AffineMap::isFunctionOfDim(), mlir::AffineMap::isFunctionOfSymbol(), replaceDimOrSym(), mlir::AffineMap::replaceDimsAndSymbols(), mlir::simplifyAffineMap(), and mlir::succeeded().
Referenced by mlir::AffineValueMap::canonicalize(), canonicalizeLoopBounds(), mlir::canonicalizeSetAndOperands(), mlir::fullyComposeAffineMapAndOperands(), and mlir::makeComposedAffineApply().
|
static |
Fully compose map with operands and canonicalize the result.
Return the createOrFold
'ed AffineApply op.
Definition at line 727 of file AffineOps.cpp.
References mlir::canonicalizeMapAndOperands(), mlir::OpBuilder::createOrFold(), and mlir::fullyComposeAffineMapAndOperands().
|
static |
Given a list of lists of parsed operands, populates uniqueOperands
with unique operands.
Also populates replacements with affine expressions of
kindthat can be used to update affine maps previously accepting a
operandsto accept
uniqueOperands` instead.
Definition at line 3385 of file AffineOps.cpp.
|
static |
Fold the constant bounds of a loop.
Definition at line 1585 of file AffineOps.cpp.
References mlir::AffineMap::constantFold(), mlir::failed(), mlir::failure(), mlir::AffineMap::getNumResults(), mlir::m_Constant(), mlir::matchPattern(), mlir::succeeded(), and mlir::success().
Referenced by hasTrivialZeroTripCount().
|
static |
This is a common class used for patterns of the form "someop(memrefcast) -> someop".
It folds the source of any memref.cast into the root operation directly.
Definition at line 981 of file AffineOps.cpp.
References mlir::Operation::getOpOperands(), and mlir::success().
Referenced by mlir::AffineDmaStartOp::fold(), mlir::AffineDmaWaitOp::fold(), CanonicalizeSingleResultAffineMinMaxOp< T >::matchAndRewrite(), and verifyMemoryOpIndexing().
|
static |
Fold an affine min or max operation with the given operands.
The operand list may contain nulls, which are interpreted as the operand not being a constant.
Definition at line 2616 of file AffineOps.cpp.
References value.
Referenced by CanonicalizeSingleResultAffineMinMaxOp< T >::matchAndRewrite().
|
static |
Returns true if the affine.for has zero iterations in trivial cases.
Definition at line 1782 of file AffineOps.cpp.
References canonicalizeLoopBounds(), foldLoopBounds(), mlir::AffineMap::getConstantMap(), mlir::Builder::getI64IntegerAttr(), getLowerBoundOperands(), mlir::AffineMap::getNumDims(), mlir::AffineMap::getNumInputs(), mlir::AffineMap::getNumResults(), mlir::AffineMap::getNumSymbols(), getUpperBoundOperands(), mlir::AffineMap::isSingleConstant(), mlir::succeeded(), and mlir::success().
|
static |
Returns true if the result of the dim op is a valid symbol for region
.
Definition at line 326 of file AffineOps.cpp.
References isMemRefSizeValidSymbol(), and mlir::isTopLevelValue().
Referenced by mlir::isValidSymbol().
|
static |
Returns true if the 'index' dimension of the memref
defined by memrefDefOp
is a statically shaped one or defined using a valid symbol for region
.
Definition at line 312 of file AffineOps.cpp.
References mlir::isValidSymbol().
Referenced by isDimOpValidSymbol().
Definition at line 432 of file AffineOps.cpp.
References mlir::isValidDim(), and mlir::isValidSymbol().
Referenced by CanonicalizeSingleResultAffineMinMaxOp< T >::matchAndRewrite(), mlir::AffineDmaStartOp::verifyInvariantsImpl(), mlir::AffineDmaWaitOp::verifyInvariantsImpl(), and verifyMemoryOpIndexing().
|
static |
Parses an affine map that can contain a min/max for groups of its results, e.g., max(expr-1, expr-2), expr-3, max(expr-4, expr-5, expr-6).
Populates result
attributes with the map (flat list of expressions) and the grouping (list of integers that specify how many expressions to put into each min/max) attributes. Deduplicates repeated operands.
parallel-bound ::= (
parallel-group-list )
parallel-group-list ::= parallel-group (,
parallel-group-list)? parallel-group ::= simple-group | min-max-group simple-group ::= expr-of-ssa-ids min-max-group ::= ( min
| max
) (
expr-of-ssa-ids-list )
expr-of-ssa-ids-list ::= expr-of-ssa-ids (,
expr-of-ssa-id-list)?
Examples: (%0, min(%1 + %2, %3), %4, min(%5 floordiv 32, %6)) (%0, max(%1 - 2 * %2))
Definition at line 3432 of file AffineOps.cpp.
|
static |
Definition at line 2594 of file AffineOps.cpp.
References mlir::AsmParser::addTypeToList(), mlir::OperationState::attributes, mlir::failure(), mlir::AsmParser::getBuilder(), mlir::Builder::getIndexType(), mlir::OperationState::operands, mlir::AsmParser::OptionalSquare, mlir::AsmParser::Paren, mlir::AsmParser::parseAttribute(), mlir::OpAsmParser::parseOperandList(), mlir::AsmParser::parseOptionalAttrDict(), mlir::OpAsmParser::resolveOperands(), and mlir::OperationState::types.
|
static |
Parse a for operation loop bounds.
Definition at line 1341 of file AffineOps.cpp.
References mlir::OperationState::addAttribute(), mlir::OperationState::addRegion(), mlir::OperationState::attributes, mlir::Attribute::dyn_cast(), mlir::AsmParser::emitError(), mlir::failed(), mlir::failure(), mlir::AsmParser::getBuilder(), mlir::AsmParser::getCurrentLocation(), mlir::Builder::getIndexType(), mlir::Builder::getIntegerAttr(), mlir::AsmParser::getNameLoc(), mlir::OperationState::location, mlir::OperationState::operands, mlir::OpAsmParser::parseArgument(), mlir::AsmParser::parseArrowTypeList(), mlir::OpAsmParser::parseAssignmentList(), mlir::AsmParser::parseAttribute(), mlir::parseDimAndSymbolList(), mlir::AsmParser::parseEqual(), mlir::AsmParser::parseKeyword(), mlir::OpAsmParser::parseOperandList(), mlir::AsmParser::parseOptionalAttrDict(), mlir::AsmParser::parseOptionalKeyword(), mlir::OpAsmParser::parseRegion(), mlir::NamedAttrList::pop_back(), mlir::OpAsmParser::resolveOperand(), mlir::succeeded(), mlir::success(), mlir::OpAsmParser::Argument::type, and mlir::OperationState::types.
|
static |
Definition at line 2581 of file AffineOps.cpp.
References mlir::OpAsmPrinter::printOptionalAttrDict().
Referenced by CanonicalizeSingleResultAffineMinMaxOp< T >::matchAndRewrite().
|
static |
Definition at line 1503 of file AffineOps.cpp.
References mlir::AffineExpr::dyn_cast(), getLowerBoundOperands(), mlir::AffineMap::getNumDims(), mlir::AffineMap::getNumInputs(), mlir::AffineMap::getNumResults(), mlir::AffineMap::getNumSymbols(), mlir::AffineMap::getResult(), getUpperBoundOperands(), print(), printDimAndSymbolList(), mlir::OpAsmPrinter::printOperand(), mlir::OpAsmPrinter::printOptionalAttrDict(), mlir::OpAsmPrinter::printRegion(), and mlir::OpAsmPrinter::printRegionArgument().
|
static |
Prints dimension and symbol list.
Definition at line 437 of file AffineOps.cpp.
Referenced by printBound(), mlir::replaceForOpWithNewYields(), and verifyDimAndSymbolIdentifiers().
|
static |
Prints a lower(upper) bound of an affine parallel loop with max(min) conditions in it.
mapAttr
is a flat list of affine expressions and group
identifies which of the those expressions form max/min groups. operands
are the SSA values of dimensions and symbols and keyword
is either "min" or "max".
Definition at line 3317 of file AffineOps.cpp.
References mlir::AffineMap::getNumDims(), mlir::AffineMap::getResult(), mlir::AffineMap::getSliceMap(), print(), mlir::OpAsmPrinter::printAffineExprOfSSAIds(), mlir::OpAsmPrinter::printAffineMapOfSSAIds(), mlir::OpAsmPrinter::printOptionalAttrDict(), and mlir::OpAsmPrinter::printRegion().
|
static |
Checks if value
known to be a legal affine dimension or symbol in src
region remains legal if the operation that uses it is inlined into dest
with the given value mapping.
legalityCheck
is either isValidDim
or isValidSymbol
, depending on the value being required to remain a valid dimension or symbol.
Definition at line 45 of file AffineOps.cpp.
References mlir::Value::getDefiningOp(), mlir::Value::isa(), mlir::isTopLevelValue(), mlir::BlockAndValueMapping::lookup(), mlir::m_Constant(), and mlir::matchPattern().
Referenced by remainsLegalAfterInline().
|
static |
Checks if all values known to be legal affine dimensions or symbols in src
remain so if their respective users are inlined into dest
.
Definition at line 74 of file AffineOps.cpp.
References remainsLegalAfterInline().
|
static |
Checks if an affine read or write operation remains legal after inlining from src
to dest
.
Definition at line 85 of file AffineOps.cpp.
References mlir::AffineMap::getNumDims(), mlir::AffineMap::getNumSymbols(), mlir::isValidDim(), mlir::isValidSymbol(), and remainsLegalAfterInline().
bool LLVM_ATTRIBUTE_UNUSED remainsLegalAfterInline | ( | AffineApplyOp | op, |
Region * | src, | ||
Region * | dest, | ||
const BlockAndValueMapping & | mapping | ||
) |
Checks if an affine apply operation remains legal after inlining from src
to dest
.
Definition at line 112 of file AffineOps.cpp.
References mlir::OpBuilder::create(), mlir::DialectInlinerInterface::DialectInlinerInterface(), mlir::Region::front(), mlir::Region::getParentOp(), mlir::Operation::hasTrait(), isLegalToInline(), mlir::isValidDim(), mlir::isValidSymbol(), materializeConstant(), remainsLegalAfterInline(), and value.
|
static |
Replace all occurrences of AffineExpr at position pos
in map
by the defining AffineApplyOp expression and operands.
When dimOrSymbolPosition < dims.size()
, AffineDimExpr@[pos] is replaced. When dimOrSymbolPosition >= dims.size()
, AffineSymbolExpr@[pos - dims.size()] is replaced. Mutate map
,dims
and syms
in place as follows:
dims
and syms
are only appended to.map
dim and symbols are gradually shifted to higer positions.dim
and sym
entries are replaced by nullptr This avoids the need for any bookkeeping. Definition at line 594 of file AffineOps.cpp.
References mlir::failure(), mlir::getAffineDimExpr(), mlir::getAffineSymbolExpr(), mlir::AffineMap::getContext(), mlir::Value::getDefiningOp(), mlir::AffineMap::getNumDims(), mlir::AffineMap::getNumResults(), mlir::AffineMap::getNumSymbols(), mlir::AffineMap::replace(), mlir::AffineMap::shiftDims(), and mlir::success().
Referenced by composeAffineMapAndOperands().
|
static |
Definition at line 2573 of file AffineOps.cpp.
References mlir::success().
Referenced by CanonicalizeSingleResultAffineMinMaxOp< T >::matchAndRewrite().
|
static |
Utility function to verify that a set of operands are valid dimension and symbol identifiers.
The operands should be laid out such that the dimension operands are before the symbol operands. This function returns failure if there was an invalid operand. An operation is provided to emit any necessary errors.
Definition at line 470 of file AffineOps.cpp.
References mlir::OperationState::attributes, mlir::AsmParser::emitError(), mlir::failed(), mlir::failure(), mlir::getAffineScope(), mlir::AsmParser::getBuilder(), mlir::Builder::getIndexType(), mlir::AsmParser::getNameLoc(), mlir::AffineMap::getNumDims(), mlir::AffineMap::getNumResults(), mlir::AffineMap::getNumSymbols(), mlir::isValidDim(), mlir::isValidSymbol(), mlir::OperationState::operands, mlir::AsmParser::parseAttribute(), mlir::parseDimAndSymbolList(), mlir::AsmParser::parseOptionalAttrDict(), print(), printDimAndSymbolList(), mlir::OpAsmPrinter::printOptionalAttrDict(), mlir::success(), mlir::OperationState::types, and mlir::verify().
Referenced by mlir::AffineDmaWaitOp::fold(), CanonicalizeSingleResultAffineMinMaxOp< T >::matchAndRewrite(), and mlir::replaceForOpWithNewYields().
|
static |
Verify common indexing invariants of affine.load, affine.store, affine.vector_load and affine.vector_store.
Definition at line 2400 of file AffineOps.cpp.
References mlir::RewritePatternSet::add(), mlir::OperationState::addAttribute(), mlir::OperationState::addOperands(), mlir::OperationState::attributes, mlir::Type::cast(), mlir::Operation::emitOpError(), mlir::failed(), mlir::failure(), foldMemRefCast(), mlir::getAffineScope(), mlir::AsmParser::getBuilder(), mlir::Value::getDefiningOp(), mlir::Builder::getEmptyAffineMap(), mlir::Builder::getIndexType(), mlir::bufferization::getMemRefType(), mlir::Builder::getMultiDimIdentityMap(), mlir::AffineMap::getNumInputs(), mlir::AffineMap::getNumResults(), mlir::Operation::getParentWithTrait(), mlir::DenseElementsAttr::getSplatValue(), mlir::Value::getType(), isValidAffineIndexOperand(), mlir::SymbolTable::lookupSymbolIn(), mlir::OperationState::operands, mlir::OpAsmParser::parseAffineMapOfSSAIds(), mlir::AsmParser::parseColonType(), mlir::AsmParser::parseComma(), mlir::OpAsmParser::parseOperand(), mlir::AsmParser::parseOptionalAttrDict(), print(), mlir::OpAsmPrinter::printAffineMapOfSSAIds(), mlir::OpAsmPrinter::printOptionalAttrDict(), mlir::OpAsmParser::resolveOperand(), mlir::OpAsmParser::resolveOperands(), mlir::succeeded(), mlir::success(), and mlir::verify().
Referenced by verifyVectorMemoryOp().
|
static |
Verify common invariants of affine.vector_load and affine.vector_store.
Definition at line 3718 of file AffineOps.cpp.
References mlir::RewritePatternSet::add(), mlir::OperationState::addAttribute(), mlir::OperationState::addOperands(), mlir::OperationState::attributes, mlir::Type::cast(), mlir::Operation::emitOpError(), mlir::failed(), mlir::failure(), mlir::AsmParser::getBuilder(), mlir::Builder::getEmptyAffineMap(), mlir::Builder::getIndexType(), mlir::bufferization::getMemRefType(), mlir::Builder::getMultiDimIdentityMap(), mlir::AffineMap::getNumInputs(), mlir::Value::getType(), getVectorType(), mlir::OperationState::operands, mlir::OpAsmParser::parseAffineMapOfSSAIds(), mlir::AsmParser::parseColonType(), mlir::AsmParser::parseComma(), mlir::OpAsmParser::parseOperand(), mlir::AsmParser::parseOptionalAttrDict(), mlir::AsmParser::parseType(), print(), mlir::OpAsmPrinter::printAffineMapOfSSAIds(), mlir::OpAsmPrinter::printOptionalAttrDict(), mlir::OpAsmParser::resolveOperand(), mlir::OpAsmParser::resolveOperands(), mlir::success(), mlir::verify(), and verifyMemoryOpIndexing().