aboutsummaryrefslogtreecommitdiff
path: root/mlir/lib/Transforms/Utils/LoopUtils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mlir/lib/Transforms/Utils/LoopUtils.cpp')
-rw-r--r--mlir/lib/Transforms/Utils/LoopUtils.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/mlir/lib/Transforms/Utils/LoopUtils.cpp b/mlir/lib/Transforms/Utils/LoopUtils.cpp
index a8c32c84..e4cbba3 100644
--- a/mlir/lib/Transforms/Utils/LoopUtils.cpp
+++ b/mlir/lib/Transforms/Utils/LoopUtils.cpp
@@ -18,6 +18,7 @@
#include "mlir/Analysis/Utils.h"
#include "mlir/Dialect/Affine/IR/AffineOps.h"
#include "mlir/Dialect/Affine/IR/AffineValueMap.h"
+#include "mlir/Dialect/MemRef/IR/MemRef.h"
#include "mlir/Dialect/SCF/SCF.h"
#include "mlir/IR/AffineMap.h"
#include "mlir/IR/BlockAndValueMapping.h"
@@ -2470,7 +2471,8 @@ static LogicalResult generateCopy(
// Create the fast memory space buffer just before the 'affine.for'
// operation.
- fastMemRef = prologue.create<AllocOp>(loc, fastMemRefType).getResult();
+ fastMemRef =
+ prologue.create<memref::AllocOp>(loc, fastMemRefType).getResult();
// Record it.
fastBufferMap[memref] = fastMemRef;
// fastMemRefType is a constant shaped memref.
@@ -2540,7 +2542,7 @@ static LogicalResult generateCopy(
// Create a tag (single element 1-d memref) for the DMA.
auto tagMemRefType = MemRefType::get({1}, top.getIntegerType(32), {},
copyOptions.tagMemorySpace);
- auto tagMemRef = prologue.create<AllocOp>(loc, tagMemRefType);
+ auto tagMemRef = prologue.create<memref::AllocOp>(loc, tagMemRefType);
SmallVector<Value, 4> tagIndices({zeroIndex});
auto tagAffineMap = b.getMultiDimIdentityMap(tagIndices.size());
@@ -2568,7 +2570,7 @@ static LogicalResult generateCopy(
numElementsSSA);
// Generate dealloc for the tag.
- auto tagDeallocOp = epilogue.create<DeallocOp>(loc, tagMemRef);
+ auto tagDeallocOp = epilogue.create<memref::DeallocOp>(loc, tagMemRef);
if (*nEnd == end && isCopyOutAtEndOfBlock)
// Since new ops are being appended (for outgoing DMAs), adjust the end to
// mark end of range of the original.
@@ -2577,7 +2579,7 @@ static LogicalResult generateCopy(
// Generate dealloc for the buffer.
if (!existingBuf) {
- auto bufDeallocOp = epilogue.create<DeallocOp>(loc, fastMemRef);
+ auto bufDeallocOp = epilogue.create<memref::DeallocOp>(loc, fastMemRef);
// When generating pointwise copies, `nEnd' has to be set to deallocOp on
// the fast buffer (since it marks the new end insertion point).
if (!copyOptions.generateDma && *nEnd == end && isCopyOutAtEndOfBlock)