mirror of git://gcc.gnu.org/git/gcc.git
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
This commit is contained in:
parent
4634c03b72
commit
a5c3d18c25
|
@ -1,3 +1,9 @@
|
|||
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>
|
||||
|
||||
* modulo-sched.c (mark_loop_unsched): Free bbs.
|
||||
|
|
|
@ -861,7 +861,7 @@ edge_badness (struct cgraph_edge *edge, bool dump)
|
|||
else
|
||||
{
|
||||
int nest = MIN (inline_edge_summary (edge)->loop_depth, 8);
|
||||
badness = estimate_growth (callee) * 256;
|
||||
badness = growth * 256;
|
||||
|
||||
/* Decrease badness if call is nested. */
|
||||
if (badness > 0)
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
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.
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
/* { 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);
|
||||
}
|
Loading…
Reference in New Issue