|
MLIR 23.0.0git
|
#include "mlir/Dialect/Vector/Transforms/IndexedAccessOpInterfaceImpl.h"#include "mlir/Dialect/MemRef/IR/MemoryAccessOpInterfaces.h"#include "mlir/Dialect/Vector/IR/VectorOps.h"#include "mlir/IR/Dialect.h"#include "mlir/IR/IRMapping.h"#include "mlir/IR/Operation.h"#include "mlir/IR/PatternMatch.h"#include <type_traits>Go to the source code of this file.
Functions | |
| template<typename LoadStoreOp> | |
| static bool | hasMemrefSemantics (Operation *op) |
| Return true if this op has the memref semantics expected by this model. | |
| template<typename LoadStoreOp> | |
| static constexpr bool | supportsRankZeroVectorAccess () |
| Return true if this op supports rank-0 vector operands/results. | |
| static unsigned | getNumLeadingUnitDims (VectorType vecTy) |
| Return the number of leading static unit dimensions in vecTy. | |
| static SmallVector< int64_t > | getAccessedVectorShape (VectorType vecTy, bool supportsRankZero) |
| Return the vector shape whose access strides must be preserved, omitting redundant leading static unit dimensions and marking scalable dimensions as dynamic. | |
| static VectorType | dropLeadingDims (VectorType vecTy, unsigned numLeadingDims) |
| Return vecTy with numLeadingDims dimensions dropped from the front. | |
| static std::optional< VectorType > | getShapeCastTypeForOperand (Value operand, VectorType vecTy, unsigned numLeadingDims) |
| Return the shape-cast type for vector operands that match vecTy. | |
|
static |
Return vecTy with numLeadingDims dimensions dropped from the front.
Definition at line 77 of file IndexedAccessOpInterfaceImpl.cpp.
Referenced by getShapeCastTypeForOperand().
|
static |
Return the vector shape whose access strides must be preserved, omitting redundant leading static unit dimensions and marking scalable dimensions as dynamic.
If the op cannot access rank-0 vectors, preserve one trailing unit dimension instead of returning an empty shape.
Definition at line 61 of file IndexedAccessOpInterfaceImpl.cpp.
References getNumLeadingUnitDims().
|
static |
Return the number of leading static unit dimensions in vecTy.
Definition at line 46 of file IndexedAccessOpInterfaceImpl.cpp.
Referenced by getAccessedVectorShape().
|
static |
Return the shape-cast type for vector operands that match vecTy.
Definition at line 85 of file IndexedAccessOpInterfaceImpl.cpp.
References dropLeadingDims(), and mlir::Value::getType().
Return true if this op has the memref semantics expected by this model.
Definition at line 34 of file IndexedAccessOpInterfaceImpl.cpp.
References getBase(), and mlir::getType().
|
staticconstexpr |
Return true if this op supports rank-0 vector operands/results.
Definition at line 40 of file IndexedAccessOpInterfaceImpl.cpp.