[Mlir-commits] [mlir] Enable printing newlines and indents in attribute and type printers (PR #87948)

Mehdi Amini llvmlistbot at llvm.org
Mon Jun 10 16:30:12 PDT 2024


joker-eph wrote:

> In the proposal it's the attribute printer's implementation choice and it is transparent to the parent operation, 

Right, this is the part I'm not convinced about :)

> if the operation uses newlines semantically 

Are there precedent for doing this? I don't remember seeing this, and don't even remember we added support for this actually.


> We would need to take that into account in attribute printers themselves. Ignoring printNewline/increaseIndent on the attribute depending on context does not seem right.

I believe the printer itself could elide calls to `printNewline` under the hood.

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


More information about the Mlir-commits mailing list