r218141 - In the Itanium ABI, move stuff to the comdat of variables with static init.

Rafael EspĂ­ndola rafael.espindola at gmail.com
Wed Dec 17 19:34:47 PST 2014


On 17 December 2014 at 22:12, Richard Smith <richard at metafoo.co.uk> wrote:
> On Wed, Dec 17, 2014 at 3:52 PM, Rafael EspĂ­ndola
> <rafael.espindola at gmail.com> wrote:
>>
>> > Based on talking to David, we think the frontend should be responsible
>> > for
>> > picking whether things are ODR or not, and then LLVM optimizations can
>> > continue to be mostly ignorant of comdats. For example, the D5
>> > destructor
>> > comdat group functions should all be inlinable.
>>
>> +1 :-)
>
>
> I think that makes a lot of sense. Does this imply that globals within a
> comdat would need to have some kind of weak linkage?

Maybe, but that is a case where we hit the problem with linkage being
too many things at once. It should be possible to put a GV in a comdat
and not have it marked STB_WEAK. Right now that is only possible with
the global linkage.

Cheers,
Rafael




More information about the cfe-commits mailing list