This is the mail archive of the gcc-patches@gcc.gnu.org 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: [PATCH 13/14] Make cgraph_edge::uid really unique.


On Thu, Jun 7, 2018 at 2:19 PM Jan Hubicka <hubicka@ucw.cz> wrote:
>
> >
> > gcc/ChangeLog:
> >
> > 2018-04-24  Martin Liska  <mliska@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?

Richard.

> OK.
> Honza


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