Commit a5c3d18c by Richard Guenther Committed by Richard Biener

re PR tree-optimization/51519 (ICE: in inline_small_functions, at…

re PR tree-optimization/51519 (ICE: in inline_small_functions, at ipa-inline.c:1410 with -O -fno-guess-branch-probability -findirect-inlining)

2011-12-13  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/51519
	* ipa-inline.c (edge_badness): Use edge growth in non-guessed
	branch probability case as well.

	* gcc.dg/pr51519.c: New testcase.

From-SVN: r182279
parent 4634c03b
2011-12-13 Richard Guenther <rguenther@suse.de>
PR tree-optimization/51519
* ipa-inline.c (edge_badness): Use edge growth in non-guessed
branch probability case as well.
2011-12-13 Revital Eres <revital.eres@linaro.org> 2011-12-13 Revital Eres <revital.eres@linaro.org>
* modulo-sched.c (mark_loop_unsched): Free bbs. * modulo-sched.c (mark_loop_unsched): Free bbs.
...@@ -861,7 +861,7 @@ edge_badness (struct cgraph_edge *edge, bool dump) ...@@ -861,7 +861,7 @@ edge_badness (struct cgraph_edge *edge, bool dump)
else else
{ {
int nest = MIN (inline_edge_summary (edge)->loop_depth, 8); int nest = MIN (inline_edge_summary (edge)->loop_depth, 8);
badness = estimate_growth (callee) * 256; badness = growth * 256;
/* Decrease badness if call is nested. */ /* Decrease badness if call is nested. */
if (badness > 0) if (badness > 0)
......
2011-12-13 Richard Guenther <rguenther@suse.de> 2011-12-13 Richard Guenther <rguenther@suse.de>
PR tree-optimization/51519
* gcc.dg/pr51519.c: New testcase.
2011-12-13 Richard Guenther <rguenther@suse.de>
* gcc.dg/lto/20111213-1_0.c: New testcase. * gcc.dg/lto/20111213-1_0.c: New testcase.
2011-12-13 Eric Botcazou <ebotcazou@adacore.com> 2011-12-13 Eric Botcazou <ebotcazou@adacore.com>
......
/* { dg-do compile } */
/* { dg-options "-O -fno-guess-branch-probability -findirect-inlining" } */
void fe (void);
int i;
static inline void
FX (void (*f) (void))
{
fe ();
(*f) ();
}
static inline void
f4 ()
{
if (i)
FX (fe);
}
static inline void
f3 (void)
{
f4 ();
if (i)
FX (f4);
}
static inline void
f2 (void)
{
FX (&f3);
}
void
f1 (void)
{
FX (&f2);
}
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