[Mlir-commits] [mlir] [mlir][linalg] do not break outs from block argument (PR #73572)

Okwan Kwon llvmlistbot at llvm.org
Mon Nov 27 14:14:34 PST 2023


================
@@ -1818,6 +1818,11 @@ struct RemoveOutsDependency : public OpRewritePattern<GenericOp> {
         if (sparse_tensor::getSparseTensorEncoding(operandVal.getType()))
           continue;
 
+        // If outs is wired from a block argument, keep the dependency to
+        // prevent the argument from being optimized away.
+        if (isa<BlockArgument>(operandVal))
----------------
okkwon wrote:

We would still need to keep the check since the value can come from an operation that does not have the interface. The case I am trying to solve is a function with `iree.abi.output` on a function parameter.



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


More information about the Mlir-commits mailing list