diff options
author | jamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-06-24 12:40:17 +0000 |
---|---|---|
committer | jamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-06-24 12:40:17 +0000 |
commit | 48f42a9a9a73f84deab78437ce66643214f32381 (patch) | |
tree | f89f7096e73c7e3897bc706a86a08d49270d459d /gcc/ipa-inline-transform.c | |
parent | ea1a929fd73a1d6c04c612149bbd68e26294c3f8 (diff) | |
download | gcc-48f42a9a9a73f84deab78437ce66643214f32381.tar.gz |
2013-06-24 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/57539
* cgraphclones.c (cgraph_clone_node): Add parameter new_inlined_to, set
global.inlined_to of the new node to it. All callers changed.
* ipa-inline-transform.c (clone_inlined_nodes): New variable
inlining_into, pass it to cgraph_clone_node.
* ipa-prop.c (ipa_propagate_indirect_call_infos): Do not call
ipa_free_edge_args_substructures.
(ipa_edge_duplication_hook): Only add edges from inlined nodes to
rdesc linked list. Do not assert rdesc edges have inlined caller.
Assert we have found an rdesc in the rdesc list.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200368 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-inline-transform.c')
-rw-r--r-- | gcc/ipa-inline-transform.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/gcc/ipa-inline-transform.c b/gcc/ipa-inline-transform.c index 9e131a4aa0e..d421c87c222 100644 --- a/gcc/ipa-inline-transform.c +++ b/gcc/ipa-inline-transform.c @@ -132,6 +132,13 @@ void clone_inlined_nodes (struct cgraph_edge *e, bool duplicate, bool update_original, int *overall_size) { + struct cgraph_node *inlining_into; + + if (e->caller->global.inlined_to) + inlining_into = e->caller->global.inlined_to; + else + inlining_into = e->caller; + if (duplicate) { /* We may eliminate the need for out-of-line copy to be output. @@ -167,18 +174,15 @@ clone_inlined_nodes (struct cgraph_edge *e, bool duplicate, { struct cgraph_node *n; n = cgraph_clone_node (e->callee, e->callee->symbol.decl, - e->count, e->frequency, - update_original, vNULL, true); + e->count, e->frequency, update_original, + vNULL, true, inlining_into); cgraph_redirect_edge_callee (e, n); } } else symtab_dissolve_same_comdat_group_list ((symtab_node) e->callee); - if (e->caller->global.inlined_to) - e->callee->global.inlined_to = e->caller->global.inlined_to; - else - e->callee->global.inlined_to = e->caller; + e->callee->global.inlined_to = inlining_into; /* Recursively clone all bodies. */ for (e = e->callee->callees; e; e = e->next_callee) |