MLIR  17.0.0git
Classes | Functions
VectorTransferPermutationMapRewritePatterns.cpp File Reference
#include "mlir/Dialect/Affine/IR/AffineOps.h"
#include "mlir/Dialect/MemRef/IR/MemRef.h"
#include "mlir/Dialect/Tensor/IR/Tensor.h"
#include "mlir/Dialect/Vector/Transforms/VectorTransforms.h"
#include "mlir/Interfaces/VectorInterfaces.h"
+ Include dependency graph for VectorTransferPermutationMapRewritePatterns.cpp:

Go to the source code of this file.

Classes

struct  TransferReadPermutationLowering
 Lower transfer_read op with permutation into a transfer_read with a permutation map composed of leading zeros followed by a minor identiy + vector.transpose op. More...
 
struct  TransferWritePermutationLowering
 Lower transfer_write op with permutation into a transfer_write with a minor identity permutation map. More...
 
struct  TransferWriteNonPermutationLowering
 Convert a transfer.write op with a map which isn't the permutation of a minor identity into a vector.broadcast + transfer_write with permutation of minor identity map by adding unit dim on inner dimension. More...
 
struct  TransferOpReduceRank
 Lower transfer_read op with broadcast in the leading dimensions into transfer_read of lower rank + vector.broadcast. More...
 

Functions

static ArrayAttr inverseTransposeInBoundsAttr (OpBuilder &builder, ArrayAttr attr, const SmallVector< unsigned > &permutation)
 Transpose a vector transfer op's in_bounds attribute by applying reverse permutation based on the given indices. More...
 
static Value extendVectorRank (OpBuilder &builder, Location loc, Value vec, int64_t addedRank)
 Extend the rank of a vector Value by addedRanks by adding outer unit dimensions. More...
 

Function Documentation

◆ extendVectorRank()

static Value extendVectorRank ( OpBuilder builder,
Location  loc,
Value  vec,
int64_t  addedRank 
)
static

Extend the rank of a vector Value by addedRanks by adding outer unit dimensions.

Definition at line 38 of file VectorTransferPermutationMapRewritePatterns.cpp.

References mlir::Type::cast(), mlir::OpBuilder::create(), and mlir::Value::getType().

Referenced by TransferWriteNonPermutationLowering::matchAndRewrite().

◆ inverseTransposeInBoundsAttr()

static ArrayAttr inverseTransposeInBoundsAttr ( OpBuilder builder,
ArrayAttr  attr,
const SmallVector< unsigned > &  permutation 
)
static

Transpose a vector transfer op's in_bounds attribute by applying reverse permutation based on the given indices.

Definition at line 26 of file VectorTransferPermutationMapRewritePatterns.cpp.

References mlir::Builder::getBoolArrayAttr().

Referenced by TransferReadPermutationLowering::matchAndRewrite(), and TransferWritePermutationLowering::matchAndRewrite().