[Mlir-commits] [mlir] [mlir] Add `Operation::dumpPrettyPrinted` (PR #120117)

weiwei chen llvmlistbot at llvm.org
Mon Dec 16 12:22:58 PST 2024


weiweichen wrote:

> I'm not really sure I'm following this API, it seems very narrow and specific. Have you considered instead the possibility of adding an argument to `dump` for providing extra flags?

Fair enough! Putting in this patch mostly because @lattner mentioned about 👇 to me the other day:
```
I'd love to see an op->dumpPrettyPrinted() method on Operation, which would be suitable for being called by the debugger. If you're interested, I'd very much +1 a patch to upstream MLIR.

It'd set the assumeVerified pretty printing flag, so it would force the "seriously, this is eyebleed, just do the thing I as a human can understand" mode
```

If debugger is ok to run `op->dump(OpPrintingFlags().useLocalScope().assumeVerified())`, "adding an argument to dump for providing extra flags" is probably a better approach?

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


More information about the Mlir-commits mailing list