[Mlir-commits] [mlir] [mlir][EmitC]Add a Reflection Map to a Class (PR #150572)
Paul Kirth
llvmlistbot at llvm.org
Fri Jul 25 09:49:23 PDT 2025
================
@@ -58,4 +58,51 @@ def WrapFuncInClassPass : Pass<"wrap-emitc-func-in-class"> {
"dictionary attributes">];
}
+def AddReflectionMapPass : Pass<"add-reflection-map", "ModuleOp"> {
+ let summary =
+ "Add a reflection map function to EmitC classes for runtime field lookup";
+ let description = [{
+ This pass adds a `getBufferForName` function to EmitC classes that enables
+ runtime lookup of field buffers by their string names.
+ This would require that the class has fields with attributes and a function named `execute`.
----------------
ilovepi wrote:
```suggestion
This requires that the class has fields with attributes and a function named `execute`.
```
Why is `execute` a requirement?
https://github.com/llvm/llvm-project/pull/150572
More information about the Mlir-commits
mailing list