[Mlir-commits] [mlir] [mlir][linalg] convert arith ops to destination-passing-style. (PR #157854)
Javed Absar
llvmlistbot at llvm.org
Sat Sep 13 03:09:36 PDT 2025
================
@@ -603,6 +612,56 @@ Value linalg::bufferizeToAllocation(
}
namespace {
+template <typename OpTy>
+FailureOr<Operation *>
+rewriteArithInDestinationPassingStyle(RewriterBase &rewriter, OpTy op) {
+ // reject ops such as `arith.constant` and `arith.select`.
+ auto numOperands = op->getNumOperands();
+ if (numOperands == 0 || numOperands > 2)
----------------
javedabsar1 wrote:
only unary and binary we care about.
https://github.com/llvm/llvm-project/pull/157854
More information about the Mlir-commits
mailing list