[Mlir-commits] [mlir] [mlir][transform] Make `yield` a `ReturnLike` op. (PR #111408)

Ingo Müller llvmlistbot at llvm.org
Mon Oct 7 10:18:45 PDT 2024


https://github.com/ingomueller-net created https://github.com/llvm/llvm-project/pull/111408

This PR adds the `ReturnLike` trait to `transform.yield`. This is required in the one-shot bufferization pass since the merging of  #110332, which analyses any `FunctionOpInterface` and expects them to have a `ReturnLike` terminator.

>From e7be852053771fb1c7fa84f4105b675e42201d7a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ingo=20M=C3=BCller?= <ingomueller at google.com>
Date: Mon, 7 Oct 2024 17:13:20 +0000
Subject: [PATCH] [mlir][transform] Make `yield` a `ReturnLike` op.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This PR adds the `ReturnLike` trait to `transform.yield`. This is
required in the one-shot bufferization pass since the merging of
 #110332, which analyses any `FunctionOpInterface` and expects them to
have a `ReturnLike` terminator.

Signed-off-by: Ingo Müller <ingomueller at google.com>
---
 mlir/include/mlir/Dialect/Transform/IR/TransformOps.td | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/mlir/include/mlir/Dialect/Transform/IR/TransformOps.td b/mlir/include/mlir/Dialect/Transform/IR/TransformOps.td
index b946fc8875860b..d3933cad920a3f 100644
--- a/mlir/include/mlir/Dialect/Transform/IR/TransformOps.td
+++ b/mlir/include/mlir/Dialect/Transform/IR/TransformOps.td
@@ -1358,7 +1358,8 @@ def VerifyOp : TransformDialectOp<"verify",
 }
 
 def YieldOp : TransformDialectOp<"yield",
-    [Terminator, DeclareOpInterfaceMethods<MemoryEffectsOpInterface>]> {
+    [Terminator, ReturnLike,
+     DeclareOpInterfaceMethods<MemoryEffectsOpInterface>]> {
   let summary = "Yields operation handles from a transform IR region";
   let description = [{
     This terminator operation yields operation handles from regions of the



More information about the Mlir-commits mailing list