aboutsummaryrefslogtreecommitdiff
path: root/mlir/lib/Transforms/LoopFusion.cpp
diff options
context:
space:
mode:
authorJulian Gross <julian.gross@dfki.de>2021-02-10 13:53:11 +0100
committerJulian Gross <julian.gross@dfki.de>2021-02-18 11:29:39 +0100
commit8aa6c3765b924d86f623d452777eb76b83bf2787 (patch)
tree4fdb7b792a6f5ec1d3277dfbd36980509f6d63b9 /mlir/lib/Transforms/LoopFusion.cpp
parentd876214990303e07310fb9f7a13b37715f051006 (diff)
downloadllvm-8aa6c3765b924d86f623d452777eb76b83bf2787.zip
llvm-8aa6c3765b924d86f623d452777eb76b83bf2787.tar.gz
llvm-8aa6c3765b924d86f623d452777eb76b83bf2787.tar.bz2
[MLIR] Create memref dialect and move several dialect-specific ops from std.
Create the memref dialect and move several dialect-specific ops without dependencies to other ops from std dialect to this dialect. Moved ops: AllocOp -> MemRef_AllocOp AllocaOp -> MemRef_AllocaOp DeallocOp -> MemRef_DeallocOp MemRefCastOp -> MemRef_CastOp GetGlobalMemRefOp -> MemRef_GetGlobalOp GlobalMemRefOp -> MemRef_GlobalOp PrefetchOp -> MemRef_PrefetchOp ReshapeOp -> MemRef_ReshapeOp StoreOp -> MemRef_StoreOp TransposeOp -> MemRef_TransposeOp ViewOp -> MemRef_ViewOp The roadmap to split the memref dialect from std is discussed here: https://llvm.discourse.group/t/rfc-split-the-memref-dialect-from-std/2667 Differential Revision: https://reviews.llvm.org/D96425
Diffstat (limited to 'mlir/lib/Transforms/LoopFusion.cpp')
-rw-r--r--mlir/lib/Transforms/LoopFusion.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/mlir/lib/Transforms/LoopFusion.cpp b/mlir/lib/Transforms/LoopFusion.cpp
index e13616e..04227ab 100644
--- a/mlir/lib/Transforms/LoopFusion.cpp
+++ b/mlir/lib/Transforms/LoopFusion.cpp
@@ -16,6 +16,7 @@
#include "mlir/Analysis/LoopAnalysis.h"
#include "mlir/Analysis/Utils.h"
#include "mlir/Dialect/Affine/IR/AffineOps.h"
+#include "mlir/Dialect/MemRef/IR/MemRef.h"
#include "mlir/IR/AffineExpr.h"
#include "mlir/IR/AffineMap.h"
#include "mlir/IR/Builders.h"
@@ -925,7 +926,7 @@ static Value createPrivateMemRef(AffineForOp forOp, Operation *srcStoreOpInst,
// consumer loop nests to reduce their live range. Currently they are added
// at the beginning of the function, because loop nests can be reordered
// during the fusion pass.
- Value newMemRef = top.create<AllocOp>(forOp.getLoc(), newMemRefType);
+ Value newMemRef = top.create<memref::AllocOp>(forOp.getLoc(), newMemRefType);
// Build an AffineMap to remap access functions based on lower bound offsets.
SmallVector<AffineExpr, 4> remapExprs;
@@ -1895,7 +1896,7 @@ public:
continue;
// Use list expected to match the dep graph info.
auto *op = memref.getDefiningOp();
- if (isa_and_nonnull<AllocOp>(op))
+ if (isa_and_nonnull<memref::AllocOp>(op))
op->erase();
}
}