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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182279
138bc75d-0d04-0410-961f-
82ee72b054a4
+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.
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)
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.
2011-12-13 Eric Botcazou <ebotcazou@adacore.com>
--- /dev/null
+/* { 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);
+}