[PATCH] D79719: [AIX] Implement AIX special alignment rule about double/long double
Xiangling Liao via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 4 17:09:22 PDT 2020
Xiangling_L added inline comments.
================
Comment at: clang/lib/AST/ASTContext.cpp:2506
if (!Target->allowsLargerPreferedTypeAlignment())
return ABIAlign;
----------------
jyknight wrote:
> I think from here on down is currently X86-specific, even though it's not phrased that way right now.
>
> It only applies if this target hook doesn't disable it, and if alignof(X) < sizeof(X), for X in {double, long long, unsigned long long}. It would be good to try to determine if there's any other platforms for which those conditions actually exist today, other than x86-32. And then determine if this code block actually _should_ trigger there. (I suspect not.) Then, mark this stuff as truthfully completely-target-specific, instead of pretending otherwise, as we do now.
>
Thank you for your suggestion. I think currently, there are three targets disabling this query, `XCore`, `X86` and `MSP430`. Since @efriedma mentioned we tried to avoid OS-specific checks here, I am not sure if mark this `completely-target-specific` is a good idea? Personally, I think a query like `allowsLargerPreferedTypeAlignment()` would give more semantic meaning.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79719/new/
https://reviews.llvm.org/D79719
More information about the cfe-commits
mailing list