[Mlir-commits] [mlir] [mlir][scf] scf.for support inline which contains affine map op. (PR #124082)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Jan 22 23:16:01 PST 2025
https://github.com/gumingsiyi created https://github.com/llvm/llvm-project/pull/124082
I want inline a call op in a scf.for region.
But there is a affine map in the function.
The inliner don't work because of the affine map.
>From 593731cb59a5f582344b245f647c6d3355492248 Mon Sep 17 00:00:00 2001
From: Steven Gu <steven.gu at evas.ai>
Date: Thu, 23 Jan 2025 15:09:41 +0800
Subject: [PATCH] [mlir][scf] scf.for support inline which contains affine map
op.
---
mlir/include/mlir/Dialect/SCF/IR/SCFOps.td | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/mlir/include/mlir/Dialect/SCF/IR/SCFOps.td b/mlir/include/mlir/Dialect/SCF/IR/SCFOps.td
index 6f408b3c924de8..6d61f724fab4f0 100644
--- a/mlir/include/mlir/Dialect/SCF/IR/SCFOps.td
+++ b/mlir/include/mlir/Dialect/SCF/IR/SCFOps.td
@@ -133,8 +133,9 @@ def ExecuteRegionOp : SCF_Op<"execute_region", [
// ForOp
//===----------------------------------------------------------------------===//
-def ForOp : SCF_Op<"for",
- [AutomaticAllocationScope, DeclareOpInterfaceMethods<LoopLikeOpInterface,
+def ForOp : SCF_Op<"for", [
+ AffineScope, AutomaticAllocationScope,
+ DeclareOpInterfaceMethods<LoopLikeOpInterface,
["getInitsMutable", "getLoopResults", "getRegionIterArgs",
"getLoopInductionVars", "getLoopLowerBounds", "getLoopSteps",
"getLoopUpperBounds", "getYieldedValuesMutable",
More information about the Mlir-commits
mailing list