diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-02 11:09:48 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-02 11:09:48 +0000 |
commit | bb4c7a44377ffbc0967d80916cae0cd8dc3b2f85 (patch) | |
tree | bdb529abaec3ec0dbd00b6e655a0f76068edb9e0 /gcc/tree-optimize.c | |
parent | af48793968ea93e7274d204c6ce43b10f00915c6 (diff) | |
download | gcc-bb4c7a44377ffbc0967d80916cae0cd8dc3b2f85.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95777 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-optimize.c')
-rw-r--r-- | gcc/tree-optimize.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gcc/tree-optimize.c b/gcc/tree-optimize.c index f934c997594..78d4ce55934 100644 --- a/gcc/tree-optimize.c +++ b/gcc/tree-optimize.c @@ -656,8 +656,7 @@ tree_rest_of_compilation (tree fndecl) /* We are not going to maintain the cgraph edges up to date. Kill it so it won't confuse us. */ - while (node->callees) - cgraph_remove_edge (node->callees); + cgraph_node_remove_callees (node); /* Initialize the default bitmap obstack. */ @@ -688,8 +687,7 @@ tree_rest_of_compilation (tree fndecl) { struct cgraph_edge *e; - while (node->callees) - cgraph_remove_edge (node->callees); + cgraph_node_remove_callees (node); node->callees = saved_node->callees; saved_node->callees = NULL; update_inlined_to_pointers (node, node); |