[Mlir-commits] [mlir] [mlir][EmitC]Add a Reflection Map to a Class (PR #150572)
Mircea Trofin
llvmlistbot at llvm.org
Mon Aug 4 07:35:16 PDT 2025
mtrofin wrote:
> > [Apologies if I missed some earlier community discussion on this] This patch seems to be one in a series aimed at supporting specific MLGO features. Would be good if we could separate generic contributions that benefit most/all EmitC users (e.g. adding an `emit.class` op) from downstream-specific ones. For instance, the pass added here seems to perform a rather specific transformation and rely on existing dialect components. Could you elaborate on why it belongs upstream in MLIR core? If you believe these patterns (reflection map, func-to-class for AoT) to be beneficial for many EmitC users, would be great if you could post an RFC on the MLIR Discourse to facilitate a wider discussion in the community.
> > + at marbre
>
> Thanks @aniragil!
>
> While there has been some discussion dating back to 2023 on what MLGO would need and resulting in the efforts by @simon-camp to add an upstream supported lowering to EmitC (PR #11754), it isn't clear to me what else is needed. Therefore, I would appreciate to discuss this based on an RFC as suggested by @aniragil.
The RFC in question is [this one](https://discourse.llvm.org/t/tosa-reference-model-from-mlir-using-emitc/4799). The [MLGO usecase](https://discourse.llvm.org/t/tosa-reference-model-from-mlir-using-emitc/4799/13) was used as [one of the motivations](https://discourse.llvm.org/t/tosa-reference-model-from-mlir-using-emitc/4799/14), especially since MLGO is in-tree. The additional requirements (for MLGO) were [listed high-level](https://discourse.llvm.org/t/tosa-reference-model-from-mlir-using-emitc/4799/16), this patch here is for the "ability to bind by name" part.
Perhaps we should make that relation to the RFC more clear in this patch description?
https://github.com/llvm/llvm-project/pull/150572
More information about the Mlir-commits
mailing list