> On 6/6/19 2:52 PM, Jan Hubicka wrote: > > Hi, > > so the only point of removing this is the fact that builds would be > > not reproducible with indir-call-topn-profile? > > That's one reason. But the main reason is that the code is dead and not used. > If you take a look at gcc/ipa-profile.c:189, the code is not supporting > HIST_TYPE_INDIR_CALL_TOPN.
Yep, i know. It is not that hard to add support for this - we currently assume that speculative edges have one direct and one indirect call. We need to add support to have multiple indirect calls which would not be too hard, but it never got high enough in my TODO list. Option is to do the mutiple value speuclation the old way dirrect in VPT. I was thinking that other possible use of TOPN is the division used in growing hashtable implementations. Those usually have small set of built in prime numbers which they use as array size and modulo always use one of the values. This is however usually not quite visible to compiler and TOPN counter could work that out. So we could do automatically more or less what htab_mod does. But yep, I have no time to work on this currently, so we may just drop it and see if we will want to recover it later. Honza > So it's broken for few years and nobody is using that. Last reason is > implementation of: > __gcov_merge_icall_topn. It's over-complicated. > > Martin > > > I still kind of thing it may be useful to track multiple most common > > values, so I would be in favour of keeping it just updating the > > documentation > > of indir-call-topn-profile that it is currently incomplete and does not > > lead to reproducible builds and does not handle speculation... > > > > Honza >