summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2013-08-26 15:23:48 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2013-08-26 15:23:48 +0000
commitdc3d1030ab651c5c07cc6caa4c571d221778bdc4 (patch)
tree380bc225ca3201be6b3b42352412323c297d2267 /gcc
parent4582129ea647da9c117adf36aea1c0f1f4bb739f (diff)
downloadgcc-dc3d1030ab651c5c07cc6caa4c571d221778bdc4.tar.gz
* ipa-inline-transform.c (inline_transform): Be ready for basic block
to be changed by edge redirection. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201997 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/ipa-inline-transform.c9
2 files changed, 11 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d004d5496a8..41d2b4167ed 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@
2013-08-26 Jan Hubicka <jh@suse.cz>
+ * ipa-inline-transform.c (inline_transform): Be ready for basic block
+ to be changed by edge redirection.
+
+2013-08-26 Jan Hubicka <jh@suse.cz>
+
* cgraph.c (cgraph_speculative_call_info): Fix parameter order and formating;
add sanity check.
(cgraph_resolve_speculation): Add FIXME about scaling profiles.
diff --git a/gcc/ipa-inline-transform.c b/gcc/ipa-inline-transform.c
index 8ead336de64..7f835eaf836 100644
--- a/gcc/ipa-inline-transform.c
+++ b/gcc/ipa-inline-transform.c
@@ -412,7 +412,7 @@ unsigned int
inline_transform (struct cgraph_node *node)
{
unsigned int todo = 0;
- struct cgraph_edge *e;
+ struct cgraph_edge *e, *next;
/* FIXME: Currently the pass manager is adding inline transform more than
once to some clones. This needs revisiting after WPA cleanups. */
@@ -424,8 +424,11 @@ inline_transform (struct cgraph_node *node)
if (preserve_function_body_p (node))
save_inline_function_body (node);
- for (e = node->callees; e; e = e->next_callee)
- cgraph_redirect_edge_call_stmt_to_callee (e);
+ for (e = node->callees; e; e = next)
+ {
+ next = e->next_callee;
+ cgraph_redirect_edge_call_stmt_to_callee (e);
+ }
ipa_remove_all_references (&node->symbol.ref_list);
timevar_push (TV_INTEGRATION);