13 #ifndef MLIR_DIALECT_VECTOR_IR_VECTOROPS_H 14 #define MLIR_DIALECT_VECTOR_IR_VECTOROPS_H 27 #include "llvm/ADT/StringExtras.h" 30 #include "mlir/Dialect/Vector/IR/VectorOpsEnums.h.inc" 34 class RewritePatternSet;
37 enum class AtomicRMWKind : uint64_t;
42 class TransferWriteOp;
59 std::pair<int, int> *mismatchingDims =
nullptr);
110 bool force32BitVectorIndices);
120 detail::BitmaskEnumStorage> {
126 CombiningKind getKind()
const;
179 VectorTransferOpInterface transferB);
184 VectorTransferOpInterface transferB);
188 #define GET_OP_CLASSES 189 #include "mlir/Dialect/Vector/IR/VectorOps.h.inc" 190 #include "mlir/Dialect/Vector/IR/VectorOpsDialect.h.inc" 192 #endif // MLIR_DIALECT_VECTOR_IR_VECTOROPS_H
Include the generated interface declarations.
Value getVectorReductionOp(arith::AtomicRMWKind op, OpBuilder &builder, Location loc, Value vector)
Returns the value obtained by reducing the vector into a scalar using the operation kind associated w...
void populateCastAwayVectorLeadingOneDimPatterns(RewritePatternSet &patterns)
Collect a set of leading one dimension removal patterns.
bool isLastMemrefDimUnitStride(MemRefType type)
Return true if the last dimension of the MemRefType has unit stride.
void populateBubbleVectorBitCastOpPatterns(RewritePatternSet &patterns)
Collect a set of patterns that bubble up/down bitcast ops.
This class defines the main interface for locations in MLIR and acts as a non-nullable wrapper around...
BroadcastableToResult isBroadcastableTo(Type srcType, VectorType dstVectorType, std::pair< int, int > *mismatchingDims=nullptr)
BroadcastableToResult
Return whether srcType can be broadcast to dstVectorType under the semantics of the vector...
Attributes are known-constant values of operations.
void populateVectorToVectorCanonicalizationPatterns(RewritePatternSet &patterns)
Collect a set of vector-to-vector canonicalization patterns.
void populateVectorMaskMaterializationPatterns(RewritePatternSet &patterns, bool force32BitVectorIndices)
These patterns materialize masks for various vector ops such as transfers.
A multi-dimensional affine map Affine map's are immutable like Type's, and they are uniqued...
bool checkSameValueWAW(TransferWriteOp write, TransferWriteOp priorWrite)
Return true if the write op fully over-write the priorWrite transfer_write op.
This base class exposes generic asm parser hooks, usable across the various derived parsers...
static void print(ArrayType type, DialectAsmPrinter &os)
Instances of the Type class are uniqued, have an immutable identifier and an optional mutable compone...
This class represents an instance of an SSA value in the MLIR system, representing a computable value...
void populateVectorMaskOpLoweringPatterns(RewritePatternSet &patterns)
Collects patterns to progressively lower vector mask ops into elementary selection and insertion ops...
AffineMap getTransferMinorIdentityMap(ShapedType shapedType, VectorType vectorType)
Build the default minor identity map suitable for a vector transfer.
void populateVectorShapeCastLoweringPatterns(RewritePatternSet &patterns)
Collects patterns to progressively lower vector.shape_cast ops on high-D vectors into 1-D/2-D vector ...
An attribute that specifies the combining function for vector.contract, and vector.reduction.
void populatePropagateVectorDistributionPatterns(RewritePatternSet &patterns)
Collect a set of patterns to propagate insert_map/extract_map in the ssa chain.
This class is a general helper class for creating context-global objects like types, attributes, and affine expressions.
void populateShapeCastFoldingPatterns(RewritePatternSet &patterns)
Collect a set of vector.shape_cast folding patterns.
static VectorType vectorType(CodeGen &codegen, Type etp)
Constructs vector type.
ArrayAttr getVectorSubscriptAttr(Builder &b, ArrayRef< int64_t > values)
Returns an integer array attribute containing the given values using the integer type required for su...
Utility class for implementing users of storage classes uniqued by a StorageUniquer.
MLIRContext is the top-level object for a collection of MLIR operations.
void populateVectorTransferLoweringPatterns(RewritePatternSet &patterns, llvm::Optional< unsigned > maxTransferRank=llvm::None)
Collect a set of transfer read/write lowering patterns.
bool isDisjointTransferIndices(VectorTransferOpInterface transferA, VectorTransferOpInterface transferB)
Same behavior as isDisjointTransferSet but doesn't require the operations to have the same tensor/mem...
IntegerType getVectorSubscriptType(Builder &builder)
Returns the integer type required for subscripts in the vector dialect.
This base class exposes generic asm printer hooks, usable across the various derived printers...
void populateVectorTransferDropUnitDimsPatterns(RewritePatternSet &patterns)
Collect a set of one dimension removal patterns.
bool checkSameValueRAW(TransferWriteOp defWrite, TransferReadOp read)
Return true if the transfer_write fully writes the data accessed by the transfer_read.
void populateFlattenVectorTransferPatterns(RewritePatternSet &patterns)
Collect a set of patterns to flatten n-D vector transfers on contiguous memref.
This class helps build Operations.
void populateVectorBroadcastLoweringPatterns(RewritePatternSet &patterns)
Collects patterns to progressively lower vector.broadcast ops on high-D vectors to low-D vector ops...
bool isDisjointTransferSet(VectorTransferOpInterface transferA, VectorTransferOpInterface transferB)
Return true if we can prove that the transfer operations access disjoint memory.