[cfe-dev] [RFC] Use preferred alignment instead of ABI alignment for complete object when applicable

James Y Knight via cfe-dev cfe-dev at lists.llvm.org
Wed Aug 19 15:07:15 PDT 2020

On Wed, Aug 19, 2020 at 5:57 PM Richard Smith <richard at metafoo.co.uk> wrote:

> On Wed, 19 Aug 2020 at 12:16, James Y Knight via cfe-dev <
> cfe-dev at lists.llvm.org> wrote:
>> I wasn't talking about the alignment of a pointer, but rather the
>> alignment of a value of type 'double', which has a preferred alignment of 8.
>> Not all double values in memory are 8 byte aligned -- some are placed
>> only at 4 byte aligned offsets. Therefore, the compiler can only assume an
>> alignment of 4 for an unknown object of type 'double' -- this is the abi
>> alignment.
> It seems to me that the term "ABI alignment" is actively confusing matters
> here -- both alignment values are part of the ABI in the AIX case. Perhaps
> "minimum alignment" would be a better term for the alignment that all
> objects of the type are guaranteed to have?

I agree that "ABI alignment" is a poor name. I like calling it "guaranteed
type alignment".
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20200819/cd74250b/attachment.html>

More information about the cfe-dev mailing list