This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Dont create redundant cgraph edges?
> 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...
Honza