MLIR  15.0.0git
Macros | Functions
PipelineDataTransfer.cpp File Reference
#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"
+ Include dependency graph for PipelineDataTransfer.cpp:

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)
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "affine-pipeline-data-transfer"

Definition at line 27 of file PipelineDataTransfer.cpp.

Function Documentation

◆ checkTagMatch()

static bool checkTagMatch ( AffineDmaStartOp  startOp,
AffineDmaWaitOp  waitOp 
)
static

◆ doubleBuffer()

static bool doubleBuffer ( Value  oldMemRef,
AffineForOp  forOp 
)
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().

◆ findMatchingStartFinishInsts()

static void findMatchingStartFinishInsts ( AffineForOp  forOp,
SmallVectorImpl< std::pair< Operation *, Operation *>> &  startWaitPairs 
)
static

◆ getTagMemRefPos()

static unsigned getTagMemRefPos ( Operation dmaOp)
static

Definition at line 52 of file PipelineDataTransfer.cpp.

Referenced by findMatchingStartFinishInsts().