On Tue, Jul 17, 2018 at 8:10 AM Bernhard Reutner-Fischer <rep.dot....@gmail.com> wrote: > > On 16 July 2018 21:38:36 CEST, Michael Ploujnikov > <michael.ploujni...@oracle.com> wrote: > >Hi, > > > > >+ clone_fn_ids = hash_map<const char *, unsigned>::create_ggc > >(1000); > > Isn't 1000 a bit excessive? What about 64 or thereabouts?
I'm not sure we should throw memory at this "problem" in this way. What specific issue does this address? Iff then I belive forgoing the automatic counter addidion is the way to go and hand control of that to the callers (for example the caller in lto/lto-partition.c doesn't even seem to need that counter. You also assume the string you key on persists - luckily the lto-partition.c caller leaks it but this makes your approach quite fragile in my eye (put the logic into clone_function_name instead, where you at least know you are dealing with a string from an indentifier which are never collected). Richard. > thanks,