bwendling wrote: It matches my understanding too. There are more issues with `__bdos` that arose due to this discussion and related discussions with the GCC maintainers.
I'm exploring some ways of fixing this issue: * As @efriedma-quic mentioned, generating the size calculation in the front end (thus eliminating the need for the intrinsic) would be difficult in the general case, but may be possible for some simpler ones. One benefit of generating the calculation instead of the intrinsic is a potential win for inlining. * If the main issue is that we don't know the subtype information, maybe we could add the subtype as part of the `llvm.objectsize` intrinsic and use that instead of grappling with the whole object's type. I'm unsure if this will work correctly for all cases though. (I don't readily know of any transformation that changes a structure's layout. Does it exist?) It's similar to the `llvm.memory.region.decl` proposal, but less intrusive. https://github.com/llvm/llvm-project/pull/78526 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits