MLIR
15.0.0git
|
#include "PassDetail.h"
#include "mlir/Dialect/Affine/Analysis/AffineAnalysis.h"
#include "mlir/Dialect/Affine/Analysis/LoopAnalysis.h"
#include "mlir/Dialect/Affine/Analysis/Utils.h"
#include "mlir/Dialect/Affine/IR/AffineOps.h"
#include "mlir/Dialect/Affine/LoopUtils.h"
#include "mlir/Dialect/Affine/Utils.h"
#include "mlir/Dialect/Arithmetic/Utils/Utils.h"
#include "mlir/Dialect/MemRef/IR/MemRef.h"
#include "mlir/IR/Builders.h"
#include "mlir/Transforms/Passes.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/Support/Debug.h"
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "affine-pipeline-data-transfer" |
Functions | |
static unsigned | getTagMemRefPos (Operation &dmaOp) |
static bool | doubleBuffer (Value oldMemRef, AffineForOp forOp) |
Doubles the buffer of the supplied memref on the specified 'affine.for' operation by adding a leading dimension of size two to the memref. More... | |
static bool | checkTagMatch (AffineDmaStartOp startOp, AffineDmaWaitOp waitOp) |
static void | findMatchingStartFinishInsts (AffineForOp forOp, SmallVectorImpl< std::pair< Operation *, Operation *>> &startWaitPairs) |
#define DEBUG_TYPE "affine-pipeline-data-transfer" |
Definition at line 27 of file PipelineDataTransfer.cpp.
|
static |
Definition at line 140 of file PipelineDataTransfer.cpp.
References mlir::AffineDmaStartOp::getTagIndices(), mlir::AffineDmaWaitOp::getTagIndices(), mlir::AffineDmaStartOp::getTagMemRef(), and mlir::AffineDmaWaitOp::getTagMemRef().
Referenced by findMatchingStartFinishInsts().
|
static |
Doubles the buffer of the supplied memref on the specified 'affine.for' operation by adding a leading dimension of size two to the memref.
Replaces all uses of the old memref by the new one while indexing the newly added dimension by the loop IV of the specified 'affine.for' operation modulo 2. Returns false if such a replacement cannot be performed.
Definition at line 66 of file PipelineDataTransfer.cpp.
References mlir::Type::cast(), copy(), mlir::OpBuilder::create(), mlir::OpBuilder::createOrFold(), mlir::detail::enumerate(), mlir::failed(), mlir::AffineMap::get(), mlir::Value::getType(), mlir::replaceAllMemRefUsesWith(), mlir::OpBuilder::setInsertionPointAfter(), mlir::MemRefType::Builder::setLayout(), mlir::MemRefType::Builder::setShape(), and mlir::Operation::walk().
Referenced by findMatchingStartFinishInsts().
|
static |
Definition at line 163 of file PipelineDataTransfer.cpp.
References mlir::affineForOpBodySkew(), checkTagMatch(), mlir::createAffineComputationSlice(), doubleBuffer(), mlir::failed(), mlir::getConstantTripCount(), mlir::Value::getDefiningOp(), mlir::Builder::getI64IntegerAttr(), mlir::getReachableAffineApplyOps(), getTagMemRefPos(), mlir::Value::hasOneUse(), mlir::isOpwiseShiftValid(), mlir::Value::use_empty(), and mlir::Value::user_begin().
Definition at line 52 of file PipelineDataTransfer.cpp.
Referenced by findMatchingStartFinishInsts().