rnk added a comment.

In D86310#4501170 <https://reviews.llvm.org/D86310#4501170>, @hvdijk wrote:

> For example, it would generally be better if long double were 8-byte-aligned, 
> but the x86 32-bit ABI specifies that it is 4-byte-aligned, and that is set 
> in stone. I would be against any change in LLVM's ABI that changed their 
> alignment, even if it would speed up code.

That may be your view, but other users rely on the `-malign-double` flag 
(D19734 <https://reviews.llvm.org/D19734>) to get the new behavior, despite the 
ABI concerns. Specifically, it mattered for users passing structs from CPU to 
GPU, because the GPU doesn't tolerate misaligned doubles well. With that in 
mind, I wouldn't describe this ABI rule as being "set in stone", but I 
understand your perspective.

Returning to the patch at hand, it sounds like we have consensus that the next 
step is to teach auto-upgrade to traverse the module looking for uses of a 
particular type in structs and IR. That logic could be reused in the future to 
solve similar problems when we need to adjust the layout of exotic types.


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