From 9610a2d753dbba385e8c2c005e2497e3add99472 Mon Sep 17 00:00:00 2001 From: Vinayaka Bandishti Date: Sat, 8 May 2021 20:12:23 +0530 Subject: [PATCH] [MLIR] Add memref dialect dependency for affine fusion pass For `AffineLoopFusion` pass, add `memref` dialect as a dependent dialect. Since the fusion pass can create `memref::AllocOp`s, the dialect must be registered in its dependent dialects. The missing dependency was not discovered until now because the above said op creation happes only when the input already has `memref::AllocOp`s in it, and all dialects in the input are automatically added to the context. Reviewed By: bondhugula Differential Revision: https://reviews.llvm.org/D102104 --- mlir/include/mlir/Transforms/Passes.td | 1 + 1 file changed, 1 insertion(+) diff --git a/mlir/include/mlir/Transforms/Passes.td b/mlir/include/mlir/Transforms/Passes.td index 39dc347..d14216b 100644 --- a/mlir/include/mlir/Transforms/Passes.td +++ b/mlir/include/mlir/Transforms/Passes.td @@ -136,6 +136,7 @@ def AffineLoopFusion : FunctionPass<"affine-loop-fusion"> { Option<"maximalFusion", "fusion-maximal", "bool", /*default=*/"false", "Enables maximal loop fusion">, ]; + let dependentDialects = ["memref::MemRefDialect"]; } def AffinePipelineDataTransfer -- 2.7.4