From: Martin Liska Date: Mon, 2 Jul 2018 07:04:01 +0000 (+0200) Subject: Revert one ipa_call_summaries::get to get_create (PR ipa/86323). X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b412559eaf51e1a6566dcbb16cca3ceba159343e;p=gcc.git Revert one ipa_call_summaries::get to get_create (PR ipa/86323). 2018-07-02 Martin Liska PR ipa/86323 * ipa-inline.c (early_inliner): Revert wrongly added ::get call. 2018-07-02 Martin Liska PR ipa/86323 * g++.dg/ipa/pr86323.C: New test. From-SVN: r262297 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 64ed2f7e954..bc9edec6247 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2018-07-02 Martin Liska + + PR ipa/86323 + * ipa-inline.c (early_inliner): Revert wrongly added ::get call. + 2018-07-02 David Malcolm * dumpfile.c (dump_generic_expr_loc): Undo removal of this diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c index a62c1ffd3b0..a84d1d9ad3e 100644 --- a/gcc/ipa-inline.c +++ b/gcc/ipa-inline.c @@ -2802,14 +2802,11 @@ early_inliner (function *fun) for (edge = node->callees; edge; edge = edge->next_callee) { /* We have no summary for new bound store calls yet. */ - ipa_call_summary *es = ipa_call_summaries->get (edge); - if (es != NULL) - { - es->call_stmt_size - = estimate_num_insns (edge->call_stmt, &eni_size_weights); - es->call_stmt_time - = estimate_num_insns (edge->call_stmt, &eni_time_weights); - } + ipa_call_summary *es = ipa_call_summaries->get_create (edge); + es->call_stmt_size + = estimate_num_insns (edge->call_stmt, &eni_size_weights); + es->call_stmt_time + = estimate_num_insns (edge->call_stmt, &eni_time_weights); if (edge->callee->decl && !gimple_check_call_matching_types ( diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index f8b82b5984b..967956fd86e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2018-07-02 Martin Liska + + PR ipa/86323 + * g++.dg/ipa/pr86323.C: New test. + 2018-07-01 Tom de Vries revert: diff --git a/gcc/testsuite/g++.dg/ipa/pr86323.C b/gcc/testsuite/g++.dg/ipa/pr86323.C new file mode 100644 index 00000000000..6632f35d86c --- /dev/null +++ b/gcc/testsuite/g++.dg/ipa/pr86323.C @@ -0,0 +1,28 @@ +/* { dg-do compile } */ +/* { dg-options "-O3 --param max-early-inliner-iterations=5" } */ + +char *s; +namespace a { +template class af { +public: + af(ae); +}; +typedef af b; +namespace ag { +class ah { +public: + void ai(b aj) { c(aj); } + virtual void c(b); +}; +class d : public ah { + void c(b); +}; +class e { + void f(bool); + void ai(b aj) { g.ai(aj); } + d g; +}; +void d::c(b) {} +void e::f(bool) { ai(s); } +} +}