aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2011-02-09 20:04:56 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2011-02-09 20:04:56 +0000
commit282ec48e048c4de1a1d478121ea2db38dcd96ecb (patch)
tree4f3a2532400bf93fb41d44ae04d80c2aa296b8a8 /gcc
parent5d85c0e3c15c67ebc3c77d4a084dca813981793d (diff)
downloadgcc-282ec48e048c4de1a1d478121ea2db38dcd96ecb.zip
gcc-282ec48e048c4de1a1d478121ea2db38dcd96ecb.tar.gz
gcc-282ec48e048c4de1a1d478121ea2db38dcd96ecb.tar.bz2
re PR middle-end/47664 (early inliner now needs iteration for multiple calls)
2011-02-09 Richard Guenther <rguenther@suse.de> PR tree-optimization/47664 * ipa-inline.c (cgraph_decide_inlining_incrementally): Visit all edges again. * gcc.dg/tree-ssa/inline-7.c: New testcase. From-SVN: r169983
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/ipa-inline.c6
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/inline-7.c9
4 files changed, 20 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 3c8de80..0b46ae8 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2011-02-09 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/47664
+ * ipa-inline.c (cgraph_decide_inlining_incrementally): Visit
+ all edges again.
+
2011-02-09 David Edelsohn <dje.gcc@gmail.com>
* config/rs6000/aix61.h (PROCESSOR_DEFAULT): Change to
diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c
index 8087c81..1d5b001 100644
--- a/gcc/ipa-inline.c
+++ b/gcc/ipa-inline.c
@@ -1643,7 +1643,6 @@ cgraph_decide_inlining_incrementally (struct cgraph_node *node,
during incremental inlining. */
&& !node->local.disregard_inline_limits)
{
- bitmap visited = BITMAP_ALLOC (NULL);
for (e = node->callees; e; e = e->next_callee)
{
int allowed_growth = 0;
@@ -1651,10 +1650,6 @@ cgraph_decide_inlining_incrementally (struct cgraph_node *node,
|| !e->inline_failed
|| e->callee->local.disregard_inline_limits)
continue;
- /* We are inlining a function to all call-sites in node
- or to none. So visit each candidate only once. */
- if (!bitmap_set_bit (visited, e->callee->uid))
- continue;
if (dump_file)
fprintf (dump_file, "Considering inline candidate %s.\n",
cgraph_node_name (e->callee));
@@ -1727,7 +1722,6 @@ cgraph_decide_inlining_incrementally (struct cgraph_node *node,
inlined = true;
}
}
- BITMAP_FREE (visited);
}
return inlined;
}
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index b5e1cb9..8f26a77 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2011-02-09 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/47664
+ * gcc.dg/tree-ssa/inline-7.c: New testcase.
+
2011-02-09 Eric Botcazou <ebotcazou@adacore.com>
PR middle-end/47646
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/inline-7.c b/gcc/testsuite/gcc.dg/tree-ssa/inline-7.c
new file mode 100644
index 0000000..16c3c86
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/inline-7.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fdump-tree-einline" } */
+
+void foo0();
+inline void bar0() { foo0(); }
+void foobar() { bar0(); bar0(); bar0(); }
+
+/* { dg-final { scan-tree-dump "Iterations: 1" "einline" } } */
+/* { dg-final { cleanup-tree-dump "einline" } } */