[cfe-commits] [PATCH] Target specific max vector alignment

Eli Friedman eli.friedman at gmail.com
Fri Jul 6 14:31:53 PDT 2012


On Fri, Jul 6, 2012 at 2:31 PM, Chad Rosier <mcrosier at apple.com> wrote:
>
> On Jul 6, 2012, at 1:45 PM, Eli Friedman wrote:
>
>> On Fri, Jul 6, 2012 at 1:14 PM, Chad Rosier <mcrosier at apple.com> wrote:
>>> All,
>>> Attached is a patch that enables a per target max vector alignment field (e.g., 32-byte alignment for x86 due to AVX).  Currently, if no aligned attribute is specified the alignment of a vector is inferred from its size.  Thus, very large vectors will be over-aligned with no benefit.  With this patch in place the alignment will be the lesser of the size of the vector and the target max alignment unless an aligned attribute is used.
>>
>> It doesn't seem likely that x86 itself will go beyond 32-byte vectors,
>> but this sort of thing is hard to predict; a few years ago, it wasn't
>> obvious that x86 was going to introduce vectors with 32-byte
>> alignment.
>
> Ok.  Do you have opinion for or against the patch or were you just making a general comment?

I'm not entirely sure whether that's an argument for or against this
patch, just that we should be careful here; it's not uncommon for
architectures to introduce new vector types, and they usually want to
be natively aligned.

-Eli




More information about the cfe-commits mailing list