[rfc] long term idea: remove appending linkage

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 7 06:42:09 PST 2015


> In the absence of comdats, would -globalopt/-globaldce do the
> right thing with @ctor1 and @C1?
>
> (I have no problem with this direction, just wondering how
> close we are right now...)

It would need to know that llvm.metadata.* is special, in a similar
way that it needs to know that llvm.ctors is special.

The change would remove some of the special cases, not all.

> We should stick with your "llvm.metadata.ctors" section in IR, rather than going straight to .init_array/.ctors/.CRT$XCU/MachO, so that GlobalOpt doesn't have to reason about the ~4 different ways of doing ctors.


Yes, sorry for not being more clear. I think we should use a
representation with multiple GVs in the same section, but the section
should be an artificial one. I don't see value is lowering all the way
to the concrete sections that ELF/MachO/COFF use.

Cheers,
Rafael


More information about the llvm-commits mailing list