This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 13/14] Make cgraph_edge::uid really unique.
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: mliska at suse dot cz, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 7 Jun 2018 14:27:10 +0200
- Subject: Re: [PATCH 13/14] Make cgraph_edge::uid really unique.
- References: <cover.1526551813.git.mliska@suse.cz> <77e86815fcbc8683a32403bdad1c68b023fac2f1.1526551813.git.mliska@suse.cz> <20180607121917.GE31751@atrey.karlin.mff.cuni.cz>
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