[Mlir-commits] [mlir] [mlir][emitc] Adding a reflection option to the class (PR #146133)
Matthias Gehre
llvmlistbot at llvm.org
Wed Jul 2 00:24:34 PDT 2025
================
@@ -1679,4 +1676,42 @@ def EmitC_GetFieldOp
let assemblyFormat = "$field_name `:` type($result) attr-dict";
}
+def BufferMapOp
----------------
mgehre-amd wrote:
My concern is that this operation is far more high level than all other emitc operations, so it doesn't fit into the dialect.
If you want to generate code like shown below, you could create a `buffer_map` op in a different dialect, and create a lowering pass that turns it into existing emitc ops corresponding to the source code shown below (we have ops for global variables, functions, calls, ternaries).
If you are missing any low level ops (e.g. do we have a reinterpret_cast one?), then those would be better additions to the emitc dialect.
https://github.com/llvm/llvm-project/pull/146133
More information about the Mlir-commits
mailing list