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

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to