> On 12/11/2013 12:45 PM, Jan Hubicka wrote: > >I wonder, if we won't end up with better code going the oposite way. > >We can declare those functions static first and then have post-inliner IPA > >pass that will > >travel the callgraph and mark all static functions/variables that are > >accessed only from > >one comdat to be comdat local. > > With that scheme I would be concerned that we would tend to inline > the wrappers so that we can't move the worker function into the > comdat, and we end up with copies of it in lots of object files.
Hmm, you are right. Inliner and ipa-cp will need a cost model for dragging stuff local in any case. Perhaps we even want to "privatize" as much as possible prior inlining. I will play with that incrementally. Lets go with minimal version of patch that makes things working and I will take care of solving the inliner limitations. Honza > > Jason