[cfe-commits] r65259 - /cfe/trunk/lib/CodeGen/CGDecl.cpp

Eli Friedman eli.friedman at gmail.com
Sat Feb 21 20:16:18 PST 2009


On Sat, Feb 21, 2009 at 7:39 PM, Daniel Dunbar <daniel at zuster.org> wrote:
> On Sat, Feb 21, 2009 at 7:23 PM, Eli Friedman <eli.friedman at gmail.com> wrote:
>> Last part of PR3254: use the same alignment computation in Sema and
>> CodeGen.  I'm not sure whether this actually makes any visible
>> difference, but it's better to be consistent anyway.
>
> It totally does:
> --
> ddunbar at milton:single-args-64$ echo "void f0(void) { double x; }" |
> clang -emit-llvm | grep alloca
>        %x = alloca double, align 8             ; <double*> [#uses=0]
> --
> used to be align 4.

Oh, okay; cool.

> It looks like we are still emitting double globals
> with an alignment of 4 instead of 8 though

That uses a different codepath.  I have a patch; I'll commit it in a bit.

> (and treating
> __alignof__(double) as 4).

I fixed that in r65260.

-Eli



More information about the cfe-commits mailing list