diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-01-08 20:23:05 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-01-08 20:23:05 +0000 |
commit | a240d038208d9de63e2b762f8d9add6130bbc73d (patch) | |
tree | 5da1cd3c072173cd3c6af1874bb0860ea4e36257 /gcc/ipa-prop.c | |
parent | 94da98cb59a60414a9c1e8346fe006c2be910258 (diff) | |
download | linaro-gcc-a240d038208d9de63e2b762f8d9add6130bbc73d.tar.gz linaro-gcc-a240d038208d9de63e2b762f8d9add6130bbc73d.tar.bz2 linaro-gcc-a240d038208d9de63e2b762f8d9add6130bbc73d.zip |
PR tree-optimization/55823
* ipa-prop.c (update_indirect_edges_after_inlining): Fix ordering issue.
git-svn-id: svn+ssh://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.c | 52 |
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; |