[Mlir-commits] [mlir] [mlir][emitc] Lower multiple results as a struct (PR #200659)
Gil Rapaport
llvmlistbot at llvm.org
Tue Jun 9 06:27:05 PDT 2026
aniragil wrote:
> This looks good to me.
Thanks @simon-camp !
> Do you plan on removing multiple result support from the emitter?
Sadly I realize the patch as-is breaks current behavior by replacing the existing std::tuple with the struct. The std::tuple is only a solution for C++, but C++ users may nonetheless prefer it over the struct (and I can't remove it without a proper PSA anyway). So I'm adding a lower-to-cpp flag in func-to-emitc (similar to the one in memref-to-emitc, except its default value will be 'true' to retain current behavior) and a similar flag in convert-to-emitc to allow that flow to support both behaviors. Please take a look.
[Independently, I think we should move the "std::tuple" support from the translator to memref-to-emitc using emitc::opaque, but that's an orthogonal change I'll do separately]
https://github.com/llvm/llvm-project/pull/200659
More information about the Mlir-commits
mailing list