[Mlir-commits] [mlir] [mlir][EmitC] Refactor MLIR Translate To Cpp (PR #84973)
Weizhe Chen
llvmlistbot at llvm.org
Fri Mar 15 07:37:48 PDT 2024
weizchen wrote:
> It would be interesting to understand why you can't use the dialect conversion mechanism to lower to EmitC actually: can you come up with examples? The solution may also be to extend EmitC concepts to better support the missing aspects that you found.
Hi, thank you for the response and your previous reviews! Regarding the question, one reason is the dialect is designed to fully target its C API, so going through EmitC adds one layer of overhead as things get a bit complicated to represent customized C operations, types and attributes with opaque families. I like the opaque and verbatim ops as they solve issues but I cannot really do much with them. For example like a compound type or like `<Cache_Level::L2, 2>` with Cache Level is a enum attribute and 2 is a variable, this is something I found a bit headache. But as you said, I think it is possible to convert to EmitC but the solution might not be as straightforward as extending the emitter.
https://github.com/llvm/llvm-project/pull/84973
More information about the Mlir-commits
mailing list