This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Question about GTY machinery (cgraph_edge)
- From: Richard Guenther <rguenth at tat dot physik dot uni-tuebingen dot de>
- To: gcc at gcc dot gnu dot org
- Date: Tue, 1 Mar 2005 14:28:27 +0100 (CET)
- Subject: Question about GTY machinery (cgraph_edge)
Hi!
struct cgraph_edge is currently member of two lists, i.e.
it contains two "next" pointers, but is annotated like
struct cgraph_edge GTY((chain_next ("%h.next_caller")))
{
struct cgraph_node *caller;
struct cgraph_node *callee;
struct cgraph_edge *next_caller;
struct cgraph_edge *next_callee;
tree call_expr;
PTR GTY ((skip (""))) aux;
/* When NULL, inline this call. When non-NULL, points to the
explanation
why function was not inlined. */
const char *inline_failed;
};
Is it possible and beneficial to have both next pointers
annotated with chain_next? The internals documentation doesn't
say anything about this. For optimization purposes, the
cgraph_node where the edges are hanging from has:
struct cgraph_node GTY((chain_next ("%h.next"), chain_prev
("%h.previous")))
{
tree decl;
struct cgraph_edge *callees;
struct cgraph_edge *callers;
struct cgraph_node *next;
...
i.e. callees first - would it the be beneficial to chain
the callee list in the edge structure to not have the marker
recursively go down this list first?
Thanks,
Richard.
--
Richard Guenther <richard dot guenther at uni-tuebingen dot de>
WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/