[llvm-commits] [llvm-gcc-4.2] r47077 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp

Dale Johannesen dalej at apple.com
Fri Feb 15 12:07:10 PST 2008


On Feb 15, 2008, at 11:56 AM, Chris Lattner wrote:

> On Feb 15, 2008, at 11:41 AM, Dale Johannesen wrote:
>>> I think this makes isPaddingElement and a bunch of code in llvm-
>>> types.cpp dead.
>>
>> Yes, thought I'd see how this patch went first:)
>
> Heh ok :)  Looks like you were right :)
>
>>> Doesn't this also cause us to regress on PR1278?
>>
>> If that's what you want to call it.  Personally I think padding  
>> should
>> be
>> deterministic whenever possible, even though the standards don't
>> require it; you get fewer Interesting bugs that way.
>
> Ok, but this still doesn't get us that, and I don't see how we
> reasonably could ever get it in general:
>
> struct mystruct x;
> x.f = 1;
> x.g = 2;
>
> leaves any padding uninitialized.

You can do it by initializing all struct objects, say to 0.  The  
overhead for that is probably too high; in practice there would be  
cases you wouldn't get.




More information about the llvm-commits mailing list