diff options
author | Richard Guenther <rguenth@gcc.gnu.org> | 2005-03-02 11:09:48 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2005-03-02 11:09:48 +0000 |
commit | 2563c2248f41b473e18c33125f40ef2196773fc0 (patch) | |
tree | bdb529abaec3ec0dbd00b6e655a0f76068edb9e0 /gcc/cgraph.h | |
parent | ceccf46b1067576cd6c9de7e4ab3af67aa35009e (diff) | |
download | gcc-2563c2248f41b473e18c33125f40ef2196773fc0.tar.gz |
cgraph.h (struct cgraph_edge): Add prev_caller and prev_callee fields.
2005-03-02 Richard Guenther <rguenth@gcc.gnu.org>
* cgraph.h (struct cgraph_edge): Add prev_caller and
prev_callee fields.
(cgraph_node_remove_callees): Export.
* cgraph.c (cgraph_create_edge): Initialize prev_caller
and prev_callee.
(cgraph_edge_remove_callee): New function.
(cgraph_edge_remove_caller): Likewise.
(cgraph_remove_edge): Use.
(cgraph_redirect_edge_callee): Likewise.
(cgraph_node_remove_callees): New function.
(cgraph_node_remove_callers): Likewise.
(cgraph_remove_node): Use.
* tree-optimize.c (tree_rest_of_compilation): Use
cgraph_node_remove_callees instead of manual loop.
* cgraphunit.c (cgraph_finalize_function): Likewise.
(cgraph_expand_function): Likewise.
(cgraph_remove_unreachable_nodes): Likewise.
From-SVN: r95777
Diffstat (limited to 'gcc/cgraph.h')
-rw-r--r-- | gcc/cgraph.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cgraph.h b/gcc/cgraph.h index ae902b2ff6c..b596a36a223 100644 --- a/gcc/cgraph.h +++ b/gcc/cgraph.h @@ -119,11 +119,13 @@ struct cgraph_node GTY((chain_next ("%h.next"), chain_prev ("%h.previous"))) bool output; }; -struct cgraph_edge GTY((chain_next ("%h.next_caller"))) +struct cgraph_edge GTY((chain_next ("%h.next_caller"), chain_prev ("%h.prev_caller"))) { struct cgraph_node *caller; struct cgraph_node *callee; + struct cgraph_edge *prev_caller; struct cgraph_edge *next_caller; + struct cgraph_edge *prev_callee; struct cgraph_edge *next_callee; tree call_expr; PTR GTY ((skip (""))) aux; @@ -165,6 +167,7 @@ void dump_cgraph (FILE *); void dump_cgraph_node (FILE *, struct cgraph_node *); void cgraph_remove_edge (struct cgraph_edge *); void cgraph_remove_node (struct cgraph_node *); +void cgraph_node_remove_callees (struct cgraph_node *node); struct cgraph_edge *cgraph_create_edge (struct cgraph_node *, struct cgraph_node *, tree); |