diff options
author | jamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-09-23 13:08:15 +0000 |
---|---|---|
committer | jamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-09-23 13:08:15 +0000 |
commit | 74140efd05d39fbd8aa69c996e30f451ac71691b (patch) | |
tree | 713f8a64e6ccf7e7bfd5473edd43495fd7cb70d1 /gcc/cgraph.c | |
parent | 1df7bc0debe2b5146b1f3bafe84e8e2abf323f06 (diff) | |
download | gcc-74140efd05d39fbd8aa69c996e30f451ac71691b.tar.gz |
2008-09-23 Martin Jambor <mjambor@suse.cz>
* cgraph.c (cgraph_free_edge): Use sizeof(*e).
(cgraph_node_remove_callees): New temporary f. Hold the next item
in f when looping.
(cgraph_node_remove_callers): Likewise.
* ipa-prop.c (ipa_edge_removal_hook): Use ATTRIBUTE_UNUSED.
(ipa_node_removal_hook): Likewise.
* doc/gimple.texi (gimple_copy_call_skip_args): Changed to
gimple_call_copy_skip_args and moved to the gimple_call section.
* gimple.c (gimple_copy_call_skip_args): Renamed to
gimple_call_copy_skip_args. Changed al users.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@140590 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r-- | gcc/cgraph.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c index 90359a46b1f..163ab9dd39f 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -752,7 +752,7 @@ cgraph_free_edge (struct cgraph_edge *e) int uid = e->uid; /* Clear out the edge so we do not dangle pointers. */ - memset (e, 0, sizeof (e)); + memset (e, 0, sizeof (*e)); e->uid = uid; NEXT_FREE_EDGE (e) = free_edges; free_edges = e; @@ -846,13 +846,14 @@ cgraph_update_edges_for_call_stmt (gimple old_stmt, gimple new_stmt) void cgraph_node_remove_callees (struct cgraph_node *node) { - struct cgraph_edge *e; + struct cgraph_edge *e, *f; /* It is sufficient to remove the edges from the lists of callers of the callees. The callee list of the node can be zapped with one assignment. */ - for (e = node->callees; e; e = e->next_callee) + for (e = node->callees; e; e = f) { + f = e->next_callee; cgraph_call_edge_removal_hooks (e); cgraph_edge_remove_callee (e); cgraph_free_edge (e); @@ -870,13 +871,14 @@ cgraph_node_remove_callees (struct cgraph_node *node) static void cgraph_node_remove_callers (struct cgraph_node *node) { - struct cgraph_edge *e; + struct cgraph_edge *e, *f; /* It is sufficient to remove the edges from the lists of callees of the callers. The caller list of the node can be zapped with one assignment. */ - for (e = node->callers; e; e = e->next_caller) + for (e = node->callers; e; e = f) { + f = e->next_caller; cgraph_call_edge_removal_hooks (e); cgraph_edge_remove_caller (e); cgraph_free_edge (e); |