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: [call graph, patch] Reuse call graph edges


Hi,

sorry for replying so late.

On Sat, Sep 13, 2008 at 12:16:58PM +0200, Richard Guenther wrote:
> On Fri, Sep 12, 2008 at 9:35 PM, Jan Hubicka <hubicka@ucw.cz> wrote:
> >> >>>>> "Martin" == Martin Jambor <mjambor@suse.cz> writes:
> >>
> >> Martin> +/* Head of a linked list of unused (freed) call graph edges.  */
> >> Martin> +static GTY(()) struct cgraph_edge *free_edges;
> >>
> >> Did you consider marking this GTY((deletable))?
> > That would make UID recycling to depend on GGC runs that would
> > eventually cause divergences in compilation.  We probably should drop a
> > comment here.

If the free list elements ever got deleted, we would stop reusing UIDs
and the problem I primarily addressed would reoccur. 

> I thought of this myself and agree that it would be a bad idea.
> With the freelist available it should be possible to compute and dump
> "sparseness" of the edge UIDs - I'd be interested in the results and if
> keeping the freelist sorted would be a win (so we'd re-use from lower UIDs).

I don't think that would help in any way.  The vectors always have
cgraph_edge_max_uid elements, no matter which UIDs we actually use.

Thanks for your thoughts though (I admit I did not know there was such
GTY attribute :-),

Martin


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