[Mlir-commits] [mlir] Save unregistered attrs after type conversion. (PR #135084)

Mehdi Amini llvmlistbot at llvm.org
Sat Aug 16 03:16:53 PDT 2025


joker-eph wrote:

> I agree that the attributes are discardable in the sense that it's perfectly legal to discard them, but it's not like there's a mandate to discarded, it's just that they're preserved on a best-effort basis, and may be discarded when convenient.

I don't think so: they **must** be discarded if we can't propagate them safely, otherwise you risk to generate incorrect programs.
Example: if the opaque discardable attributes would be identifying which block arguments are not aliasing with each other, and you remove a block argument, suddenly downstream you get the annotation to lie with terrible consequences. The transformation not understanding the attribute can't know about this.

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


More information about the Mlir-commits mailing list