This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Dont create redundant cgraph edges?
- From: Richard Guenther <rguenth at tat dot physik dot uni-tuebingen dot de>
- To: Jan Hubicka <jh at suse dot cz>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 5 Nov 2003 11:57:29 +0100 (CET)
- Subject: Re: [PATCH] Dont create redundant cgraph edges?
On Wed, 5 Nov 2003, Jan Hubicka wrote:
> > Hi!
> > Why does cgraph.c:create_edge create redundant callgraph edges at all?
> > By introducing a refcount as in the patch below we could save some memory
> > and possibly callee/caller list walking time. I put an abort() in case
> The idea is that you can get different information on each edge once it
> is attached specifically to given call_expr.
> Imagine situation where you want to inline function A into B in internal
> loop of B but not outside. Similar cases appear commonly in dataflow
> solving I want to implement on tree-ssa in foreseable future.
> For that reason I would preffer to not share the edges even when we
> don't have much use for it at the very moment...
Well, I dont expect this to happen in 3.4, do you? Of course splitting the
shared edges is neccessary for doing profile based inlining. We also want
to be able to duplicate the callgraph nodes to account for calls with
constant arguments, etc. here. I didnt check compile time / memory
requirements with/without the patch, but if it improves the situation
here, I suspect we want to go this way for 3.4.
Richard Guenther <richard dot guenther at uni-tuebingen dot de>