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

Ɓukasz Mielicki llvmlistbot at llvm.org
Thu Apr 25 01:27:28 PDT 2024


lmielick wrote:

> Right: this is what I meant to point at in terms of composability of the printing: the readability of an op with multiple attribute seems to be quite context dependent. Is this printing always desirable in the IR? While focusing on this one attribute seems better, the overall IR flow can become unbearable.

This is more of an enabler than a prescriptive change and it does not affect any existing IR formatting.
It is mainly intended to expose formatting capabilities to custom attribute printers. That greatly improves readability in specific cases where attributes carry sizable structured information. Much of the boilerplate can be avoided with custom printers. It has proven effective in a large codebase of ours.

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


More information about the Mlir-commits mailing list