[llvm-commits] [llvm-gcc-4.2] r46334 - /llvm-gcc-4.2/trunk/gcc/llvm-types.cpp

Chris Lattner clattner at apple.com
Fri Jan 25 08:18:28 PST 2008


On Jan 25, 2008, at 1:01 AM, Duncan Sands wrote:

> Hi Devang,
>
>> Fix 2008-01-24-StructAlignAndBitFields.c test case.
>> Bit-field type does not influence struct alignment.
>
> I don't see the point of trying to get the LLVM type to have the same
> alignment as the gcc type.  I think all the code that tries to obtain
> equal alignment should just be dropped.  Who cares if the LLVM type  
> has
> a different alignment to the gcc type?  Surely all that matters is  
> that
> when we allocate a variable (alloca or global), if the gcc declaration
> is more aligned than the LLVM type, then we should force the alloca/ 
> global
> to have the gcc alignment.

Right.  There are several cases where we *can't* get the same  
alignment.  If dropping the attempts makes the code simpler, I say go  
for it :)

-Chris



More information about the llvm-commits mailing list