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] 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.

--
Richard Guenther <richard dot guenther at uni-tuebingen dot de>
WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/


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