[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:48 PST 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-mlir

Author: gumingsiyi (gumingsiyi)

<details>
<summary>Changes</summary>

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.


---
Full diff: https://github.com/llvm/llvm-project/pull/124082.diff


1 Files Affected:

- (modified) mlir/include/mlir/Dialect/SCF/IR/SCFOps.td (+3-2) 


``````````diff
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",

``````````

</details>


https://github.com/llvm/llvm-project/pull/124082


More information about the Mlir-commits mailing list