> On Thu, Jun 7, 2018 at 2:19 PM Jan Hubicka <hubi...@ucw.cz> wrote: > > > > > > > > gcc/ChangeLog: > > > > > > 2018-04-24 Martin Liska <mli...@suse.cz> > > > > > > * cgraph.c (symbol_table::create_edge): Always assign a new > > > unique number. > > > (symbol_table::free_edge): Do not recycle numbers. > > > * cgraph.h (cgraph_edge::get): New method. > > > * symbol-summary.h (symtab_removal): Use it. > > > (symtab_duplication): Likewise. > > > (call_summary::hashable_uid): Remove. > > I think we should protect ourselves against overflow of the 'int' > counter (and make it unsigned?!). > > Like with a simple gcc_assert (++edges_max_uid != 0); or so. > > We throw away/recompute edges often enough so that we _might_ > hit 2 billion edges, no?
We throw away those constant times for every function, but yes, overflow check is quite likely good idea :) Honza