[Mlir-commits] [mlir] [mlir][affine] Enable ConvertAffineToStandard (lower-affine) pass to handle affine.delinearize_index Op. (PR #82189)

Rishabh Bali llvmlistbot at llvm.org
Sun Feb 18 13:41:09 PST 2024


https://github.com/Ris-Bali created https://github.com/llvm/llvm-project/pull/82189

This PR, aims to enable the `LowerAffinePass` to handle `affine.dilinearize_index` Operation.

Fixes #78458 



>From f2e4c972b463420b8fa6d9542521b745e6d6935b Mon Sep 17 00:00:00 2001
From: Rishabh Bali <rishabhsbali at gmail.com>
Date: Mon, 19 Feb 2024 02:38:48 +0530
Subject: [PATCH] Initial commit

---
 mlir/lib/Conversion/AffineToStandard/AffineToStandard.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/mlir/lib/Conversion/AffineToStandard/AffineToStandard.cpp b/mlir/lib/Conversion/AffineToStandard/AffineToStandard.cpp
index 15ad6d8cdf629d..3f86c2077e716b 100644
--- a/mlir/lib/Conversion/AffineToStandard/AffineToStandard.cpp
+++ b/mlir/lib/Conversion/AffineToStandard/AffineToStandard.cpp
@@ -15,6 +15,7 @@
 
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
 #include "mlir/Dialect/Affine/Utils.h"
+#include "mlir/Dialect/Affine/Transforms/Transforms.h"
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
 #include "mlir/Dialect/SCF/IR/SCF.h"
 #include "mlir/Dialect/Vector/IR/VectorOps.h"
@@ -560,6 +561,7 @@ class LowerAffinePass
     RewritePatternSet patterns(&getContext());
     populateAffineToStdConversionPatterns(patterns);
     populateAffineToVectorConversionPatterns(patterns);
+    populateAffineExpandIndexOpsPatterns(patterns);
     ConversionTarget target(getContext());
     target.addLegalDialect<arith::ArithDialect, memref::MemRefDialect,
                            scf::SCFDialect, VectorDialect>();



More information about the Mlir-commits mailing list