[Mlir-commits] [mlir] [mlir][linalg] Edit the yieldOutputs method's builder (PR #73900)

Amir Bishara llvmlistbot at llvm.org
Thu Nov 30 00:02:26 PST 2023


================
@@ -480,8 +480,8 @@ class RegionBuilderHelper {
     llvm_unreachable("unsupported type conversion function");
   }
 
-  void yieldOutputs(ValueRange values) {
-    OpBuilder builder = getBuilder();
+  void yieldOutputs(OpBuilder builder, ValueRange values) {
+    builder.setInsertionPointToEnd(&block);
----------------
amirBish wrote:

In the previous one the builder is being constructed from the block's argument context  `block.getArgument(0).getContext()` , here is not the case It is being passed as is.
I really wondered why should this result a memory leak. Therefore, would be glad for your review/advice :) .

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


More information about the Mlir-commits mailing list