[PATCH] D86310: [X86] Align i128 to 16 bytes in x86-64 datalayout
Reid Kleckner via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 13 14:41:51 PDT 2023
rnk added a comment.
In D86310#4498575 <https://reviews.llvm.org/D86310#4498575>, @efriedma wrote:
> https://reviews.llvm.org/D86310#2231136 has an example where IR generated by clang breaks.
Right, so we'd break LTO of packed structs with i128 members.
I still think we're overthinking this, and letting our ABI compat concerns block us from making progress. Maybe we could do something as simple as erroring out from the auto-upgrader when the module being upgraded has a struct whose layout would change as a result of the increased i128 alignment, while remaining bitcode compatible in the vast majority of cases.
As for the longer term solution to this problem, instead of permitting mixed data layouts of data layout customization, IMO LLVM structs should explicitly encode field offsets. LLVM would still have APIs to assist frontends with producing semi-C-compatible struct layouts, in so much as we do today.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86310/new/
https://reviews.llvm.org/D86310
More information about the cfe-commits
mailing list