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

Eli Friedman eli.friedman at gmail.com
Fri Jul 6 13:45:48 PDT 2012


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.

-Eli




More information about the cfe-commits mailing list