This is the mail archive of the 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: pretty-ipa merge part 19: Clonning infrastructure

Richard Guenther wrote:

> The proper fix is to defer to the inliner to do the cloning and to
> re-implement thunks like Diego suggested for LTO.

Well, I think the *proper* fix is to implement multiple entry points,
and then use that.  Both clones and thunks are really multiple entry
points, and especially in the case of clones, using multiple entry
points would reduce code size with very little cost in time, if any.

In any case, for right now...

IIRC, the C++ ABI implies that when you emit one clone, you must emit
them all.  Otherwise, you end up with confusion if one COMDAT section
has one clone and another COMDAT section with the same name has the
other.  So, the situation Jan is describing where we end up with the
clone, but not the original function, sounds like a bad thing.  It
sounds like we need to prevent that.  I thought we had already done
that, via explicit calls in the C++ front end to mark functions needed,
but perhaps I am wrong -- or perhaps something changed?

Mark Mitchell
(650) 331-3385 x713

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