[Mlir-commits] [flang] [mlir] [RFC][Draft][flang][FIR] Model implict box allocations in side effects (PR #178412)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Jan 28 05:33:01 PST 2026
jeanPerier wrote:
Hi Tom, thanks for sharing this. I agree there is something tricky brittle around the current implementation of the fir.box type, especially when combined with parallel contexts. However, I think we should rather make the fir.box a "true value" (*) rather than exposing and enshrining the current implementation of the type.
CSE/value level optimizations of fir.box was a main point of making descriptor a value type.
(*) the "true value" only means some type that would always lowers to an LLVM value type, but it is just a matter of abstraction level, because llvm.struct can very well end-up being allocated on the stack in the end.
I have been testing a bit in the background, the main obstacle I have at that point is that conversion of fir.box types are very common and are assuming a memory implementation (otherwise many cases would be lossy).
https://github.com/llvm/llvm-project/pull/178412
More information about the Mlir-commits
mailing list