This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Ignore cxa_pure_virtual in ipa-devirt's target lists


On 04/14/2014 04:06 PM, Jan Hubicka wrote:
1) write backend pass that walks vtables and for every non-hidden noreturn function
    it can produce hidden COMDAT wrapper with a fixed (GCC local) mangling.
    Perhaps with a command line option to do so for all virtual functions; while this
    would introduce extra call into most of virtual calls, this may not be too bad
    with LTO, where we can do that only for virtuals that are exported from unit.

With LTO, we could do this for all virtuals that are not defined locally; nothing in the language allows you to compare the address value of a vtable element...but I suppose speculative devirtualization does, so maybe not.

2) make something similar in C++ FE (probably not so cool idea because of the comment
    above)
3) introduce hidden local_cxa_pure_virtual into bits that are linked into every
    DSO so we do not need to play with COMDAT.

This makes sense to me.

Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]