[PATCH] Introduce __BIGGEST_ALIGNMENT__ macro

mats petersson mats at planetcatfish.com
Sat Dec 13 14:06:50 PST 2014


In gcc, the value does not change with -mno-sse or -mno-sse2, or based on
-m32 or -m64. Same applies in my definition. It is simply a case of "this
is the architecture's largest necessary alignment for code correctness"
(AVX prefers 32-byte alignment, but only required to be 16-byte aligned -
with 32-byte alignment, it apparently works better if it doesn't straddle
the cache-lines).

--
Mats

On 13 December 2014 at 21:32, Joerg Sonnenberger <joerg at britannica.bec.de>
wrote:

> On Sat, Dec 13, 2014 at 09:15:53PM +0000, mats petersson wrote:
> > So, what kind of documentation would you like to see?
> >
> > The GCC docs here:
> > https://gcc.gnu.org/onlinedocs/gcc/Variable-Attributes.html
> >
> > say: GCC also provides a target specific macro __BIGGEST_ALIGNMENT__,
> which
> > is the largest alignment ever used for any data type on the target
> machine
> > you are compiling for.
>
> How does that interact with codegen flags like -mno-sse2? What about
> support for new target types in later version -- from the writing it is
> nowhere clear that this macro is not fixed.
>
> Joerg
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20141213/3cbbadd8/attachment.html>


More information about the cfe-commits mailing list