Commit 1cf06f1e by Marek Polacek Committed by Marek Polacek

re PR ipa/65008 (ICE: in estimate_edge_growth, at ipa-inline.h:298 with -O2)

	PR ipa/65008
	* ipa-inline.c (early_inliner): Recompute inline parameters.

	* g++.dg/ipa/pr65008.C: New test.

From-SVN: r221025
parent 3809f645
2015-02-26 Marek Polacek <polacek@redhat.com>
PR ipa/65008
* ipa-inline.c (early_inliner): Recompute inline parameters.
2015-02-26 Bill Schmidt <wschmidt@linux.vnet.ibm.com> 2015-02-26 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR target/65171 PR target/65171
......
...@@ -2559,6 +2559,19 @@ early_inliner (function *fun) ...@@ -2559,6 +2559,19 @@ early_inliner (function *fun)
{ {
timevar_push (TV_INTEGRATION); timevar_push (TV_INTEGRATION);
todo |= optimize_inline_calls (current_function_decl); todo |= optimize_inline_calls (current_function_decl);
/* optimize_inline_calls call above might have introduced new
statements that don't have inline parameters computed. */
for (edge = node->callees; edge; edge = edge->next_callee)
{
if (inline_edge_summary_vec.length () > (unsigned) edge->uid)
{
struct inline_edge_summary *es = inline_edge_summary (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);
}
}
inline_update_overall_summary (node); inline_update_overall_summary (node);
inlined = false; inlined = false;
timevar_pop (TV_INTEGRATION); timevar_pop (TV_INTEGRATION);
......
2015-02-26 Marek Polacek <polacek@redhat.com>
PR ipa/65008
* g++.dg/ipa/pr65008.C: New test.
2015-02-26 Tom de Vries <tom@codesourcery.com> 2015-02-26 Tom de Vries <tom@codesourcery.com>
* lib/profopt.exp (profopt-target-cleanup): New proc. * lib/profopt.exp (profopt-target-cleanup): New proc.
......
// PR ipa/65008
// { dg-do compile }
// { dg-options "-O2" }
struct A
{
A ();
virtual void foo () {}
};
static inline int __attribute__ ((always_inline)) call_foo (A *a)
{
a->foo ();
}
A::A ()
{
call_foo (this);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment