MLIR  16.0.0git
Functions
MultiBuffer.cpp File Reference
#include "mlir/Dialect/Affine/IR/AffineOps.h"
#include "mlir/Dialect/MemRef/IR/MemRef.h"
#include "mlir/Dialect/MemRef/Transforms/Passes.h"
#include "mlir/IR/Dominance.h"
#include "mlir/Interfaces/LoopLikeInterface.h"
+ Include dependency graph for MultiBuffer.cpp:

Go to the source code of this file.

Functions

static bool overrideBuffer (Operation *op, Value buffer)
 Return true if the op fully overwrite the given buffer value. More...
 
static void replaceUsesAndPropagateType (Operation *oldOp, Value val, OpBuilder &builder)
 Replace the uses of oldOp with the given val and for subview uses propagate the type change. More...
 
static Value getOrCreateValue (OpFoldResult res, OpBuilder &builder, Location loc)
 Helper to convert get a value from an OpFoldResult or create it at the builder insert point. More...
 

Function Documentation

◆ getOrCreateValue()

static Value getOrCreateValue ( OpFoldResult  res,
OpBuilder builder,
Location  loc 
)
static

Helper to convert get a value from an OpFoldResult or create it at the builder insert point.

Definition at line 67 of file MultiBuffer.cpp.

Referenced by mlir::memref::multiBuffer().

◆ overrideBuffer()

static bool overrideBuffer ( Operation op,
Value  buffer 
)
static

Return true if the op fully overwrite the given buffer value.

Definition at line 22 of file MultiBuffer.cpp.

Referenced by mlir::memref::multiBuffer().

◆ replaceUsesAndPropagateType()

static void replaceUsesAndPropagateType ( Operation oldOp,
Value  val,
OpBuilder builder 
)
static

Replace the uses of oldOp with the given val and for subview uses propagate the type change.

Changing the memref type may require propagating it through subview ops so we cannot just do a replaceAllUse but need to propagate the type change and erase old subview ops.

Definition at line 33 of file MultiBuffer.cpp.

References mlir::Type::cast(), mlir::OpBuilder::create(), mlir::extractFromI64ArrayAttr(), mlir::Value::getType(), mlir::Operation::getUses(), and mlir::OpBuilder::setInsertionPoint().

Referenced by mlir::memref::multiBuffer().