aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-prop.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2013-01-08 20:23:05 +0000
committerJan Hubicka <jh@suse.cz>2013-01-08 20:23:05 +0000
commit62fb60f22b2fc35eec0742030481baef2d7f4499 (patch)
tree5da1cd3c072173cd3c6af1874bb0860ea4e36257 /gcc/ipa-prop.c
parent398e9f92e5ca5e7ba54008c631305bf3018b932c (diff)
PR tree-optimization/55823
* ipa-prop.c (update_indirect_edges_after_inlining): Fix ordering issue. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@195033 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-prop.c')
-rw-r--r--gcc/ipa-prop.c52
1 files changed, 25 insertions, 27 deletions
diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c
index d225b85f7d0..2c7e13c3276 100644
--- a/gcc/ipa-prop.c
+++ b/gcc/ipa-prop.c
@@ -2264,40 +2264,15 @@ update_indirect_edges_after_inlining (struct cgraph_edge *cs,
param_index = ici->param_index;
jfunc = ipa_get_ith_jump_func (top, param_index);
- if (jfunc->type == IPA_JF_PASS_THROUGH
- && ipa_get_jf_pass_through_operation (jfunc) == NOP_EXPR)
- {
- if (ici->agg_contents
- && !ipa_get_jf_pass_through_agg_preserved (jfunc))
- ici->param_index = -1;
- else
- ici->param_index = ipa_get_jf_pass_through_formal_id (jfunc);
- }
- else if (jfunc->type == IPA_JF_ANCESTOR)
- {
- if (ici->agg_contents
- && !ipa_get_jf_ancestor_agg_preserved (jfunc))
- ici->param_index = -1;
- else
- {
- ici->param_index = ipa_get_jf_ancestor_formal_id (jfunc);
- ici->offset += ipa_get_jf_ancestor_offset (jfunc);
- }
- }
- else
- /* Either we can find a destination for this edge now or never. */
- ici->param_index = -1;
if (!flag_indirect_inlining)
- continue;
-
- if (ici->polymorphic)
+ new_direct_edge = NULL;
+ else if (ici->polymorphic)
new_direct_edge = try_make_edge_direct_virtual_call (ie, jfunc,
new_root_info);
else
new_direct_edge = try_make_edge_direct_simple_call (ie, jfunc,
new_root_info);
-
if (new_direct_edge)
{
new_direct_edge->indirect_inlining_edge = 1;
@@ -2312,6 +2287,29 @@ update_indirect_edges_after_inlining (struct cgraph_edge *cs,
res = true;
}
}
+ else if (jfunc->type == IPA_JF_PASS_THROUGH
+ && ipa_get_jf_pass_through_operation (jfunc) == NOP_EXPR)
+ {
+ if (ici->agg_contents
+ && !ipa_get_jf_pass_through_agg_preserved (jfunc))
+ ici->param_index = -1;
+ else
+ ici->param_index = ipa_get_jf_pass_through_formal_id (jfunc);
+ }
+ else if (jfunc->type == IPA_JF_ANCESTOR)
+ {
+ if (ici->agg_contents
+ && !ipa_get_jf_ancestor_agg_preserved (jfunc))
+ ici->param_index = -1;
+ else
+ {
+ ici->param_index = ipa_get_jf_ancestor_formal_id (jfunc);
+ ici->offset += ipa_get_jf_ancestor_offset (jfunc);
+ }
+ }
+ else
+ /* Either we can find a destination for this edge now or never. */
+ ici->param_index = -1;
}
return res;