MLIR  19.0.0git
Macros | Functions
VectorUnroll.cpp File Reference
#include "mlir/Dialect/Affine/IR/AffineOps.h"
#include "mlir/Dialect/Utils/IndexingUtils.h"
#include "mlir/Dialect/Vector/Transforms/VectorTransforms.h"
#include "mlir/IR/ImplicitLocOpBuilder.h"
#include "mlir/Interfaces/VectorInterfaces.h"
#include "mlir/Support/MathExtras.h"
#include "llvm/ADT/MapVector.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Support/Debug.h"
#include <numeric>
#include <optional>

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "vector-unroll"
 
#define DBGS()   (llvm::dbgs() << "[" DEBUG_TYPE "]: ")
 
#define LDBG(X)   LLVM_DEBUG(DBGS() << X << "\n")
 

Functions

static SmallVector< ValuesliceTransferIndices (ArrayRef< int64_t > elementOffsets, ArrayRef< Value > indices, AffineMap permutationMap, Location loc, OpBuilder &builder)
 Compute the indices of the slice index for a tranfer op. More...
 
static OperationcloneOpWithOperandsAndTypes (OpBuilder &builder, Location loc, Operation *op, ArrayRef< Value > operands, ArrayRef< Type > resultTypes)
 
static std::optional< SmallVector< int64_t > > getTargetShape (const vector::UnrollVectorOptions &options, Operation *op)
 Return the target shape for unrolling for the given op. More...
 
static SmallVector< int64_t > getUnrollOrder (unsigned numLoops, Operation *op, const vector::UnrollVectorOptions &options)
 

Macro Definition Documentation

◆ DBGS

#define DBGS ( )    (llvm::dbgs() << "[" DEBUG_TYPE "]: ")

Definition at line 26 of file VectorUnroll.cpp.

◆ DEBUG_TYPE

#define DEBUG_TYPE   "vector-unroll"

Definition at line 25 of file VectorUnroll.cpp.

◆ LDBG

#define LDBG (   X)    LLVM_DEBUG(DBGS() << X << "\n")

Definition at line 27 of file VectorUnroll.cpp.

Function Documentation

◆ cloneOpWithOperandsAndTypes()

static Operation* cloneOpWithOperandsAndTypes ( OpBuilder builder,
Location  loc,
Operation op,
ArrayRef< Value operands,
ArrayRef< Type resultTypes 
)
static

Definition at line 61 of file VectorUnroll.cpp.

◆ getTargetShape()

static std::optional<SmallVector<int64_t> > getTargetShape ( const vector::UnrollVectorOptions options,
Operation op 
)
static

Return the target shape for unrolling for the given op.

Return std::nullopt if the op shouldn't be or cannot be unrolled.

Definition at line 72 of file VectorUnroll.cpp.

◆ getUnrollOrder()

static SmallVector<int64_t> getUnrollOrder ( unsigned  numLoops,
Operation op,
const vector::UnrollVectorOptions options 
)
static

Definition at line 118 of file VectorUnroll.cpp.

◆ sliceTransferIndices()

static SmallVector<Value> sliceTransferIndices ( ArrayRef< int64_t >  elementOffsets,
ArrayRef< Value indices,
AffineMap  permutationMap,
Location  loc,
OpBuilder builder 
)
static