[Mlir-commits] [mlir] [Linalg] Preserve discardable/user-defined attributes during generalization (PR #178599)
Mehdi Amini
llvmlistbot at llvm.org
Thu Jan 29 02:19:30 PST 2026
================
@@ -64,6 +64,10 @@ FailureOr<GenericOp> mlir::linalg::generalizeNamedOp(RewriterBase &rewriter,
outputs, indexingMaps, iterators);
rewriter.inlineRegionBefore(linalgOp->getRegion(0), genericOp.getRegion(),
genericOp.getRegion().begin());
+
+ // Preserve discardable (user-defined) attributes from the original op.
----------------
joker-eph wrote:
Nit: this comment isn't helpful as it is entirely redundant with the code it documents. As useful comment could be to explain why it is the right thing to do (instead of dropping) and why is it safe.
(the change is likely right here otherwise)
https://github.com/llvm/llvm-project/pull/178599
More information about the Mlir-commits
mailing list