[llvm-commits] [llvm-gcc-4.2] r98626 - /llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
Chris Lattner
clattner at apple.com
Tue Mar 16 14:23:26 PDT 2010
On Mar 16, 2010, at 1:10 PM, Duncan Sands wrote:
> On 16/03/10 19:18, Chris Lattner wrote:
>> On Mar 16, 2010, at 11:15 AM, Duncan Sands wrote:
>>>> I originally tried to do this for llvm-gcc 3 and was defeated by libstdc++. It assumes (and it turns out the c++ standard allows this) that global variables are zero initialized before the constructor for a type is run on it.
>>>
>>> That is so annoying! You could do easily do some nice simplifications if this
>>> wasn't the case...
>>
>> Yeah I know. I assume you noticed the globalopt xforms that build on this. I added those back when I thought that the c++ frontend could take advantage of it, then had to revert the frontend changes.
>
> Actually those globalopt transforms are still useful - for Ada. In Ada a global
> variable without an explicit initializer is not implicitly zero-initialized, it
> is simply uninitialized (undef).
Yep, that's why I didn't remove them :)
-Chris
More information about the llvm-commits
mailing list