[Mlir-commits] [mlir] [emitC]Option to mlir-translate class instead of function (PR #141158)

Jacques Pienaar llvmlistbot at llvm.org
Thu May 29 11:51:24 PDT 2025


https://github.com/jpienaar commented:

I'd have to find it again, but I believe there was a previous discussion on this (it was emitc specific but there is also a more general approach behind,  [https://www.youtube.com/watch?v=hIt6J1_E21c).](https://www.youtube.com/watch?v=hIt6J1_E21c).) In short the principle is that translates are simple from MLIR IR to some external format, ones that are rather trivial to check that correct and these input/output dialects are close to format so that more complex operations are plain MLIR IR -> IR transforms (where one has all the regular tooling, testing & debugging). Which is why you'll see most of the translate functions make no large decisions. Now, wrt C++ translation, it simply today does what is represented in Emit today. EmitC provides the script for the emission. So I'd expect this to be a pass before translate really.

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


More information about the Mlir-commits mailing list