re PR middle-end/28071 (A file that can not be compiled in reasonable time/space)
authorJan Hubicka <jh@suse.cz>
Mon, 24 Jul 2006 11:23:21 +0000 (13:23 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Mon, 24 Jul 2006 11:23:21 +0000 (11:23 +0000)
PR rtl-optimization/28071
* ipa-inline.c (update_caller_keys): Remove edges that
are no longer inline candidates.

From-SVN: r115712

gcc/ChangeLog
gcc/ipa-inline.c

index 415a58ac267e20a8021077be13208582677f16c2..2151f0a6c37c000ee04f2e8d4bbbd77b38210952 100644 (file)
@@ -1,3 +1,9 @@
+2006-07-24  Jan Hubicka  <jh@suse.cz>
+
+       PR rtl-optimization/28071
+       * ipa-inline.c (update_caller_keys): Remove edges that
+       are no longer inline candidates.
+
 2006-07-23  Daniel Jacobowitz  <dan@codesourcery.com>
 
        PR debug/27473
index 0ffbd1272deaeca33f6ac1015a27c3f897d5c7ba..d2cdce2b0ea7fa5c8f1495c809ffd2f1b2cf0379 100644 (file)
@@ -413,6 +413,7 @@ update_caller_keys (fibheap_t heap, struct cgraph_node *node,
                    bitmap updated_nodes)
 {
   struct cgraph_edge *edge;
+  const char *failed_reason;
 
   if (!node->local.inlinable || node->local.disregard_inline_limits
       || node->global.inlined_to)
@@ -422,6 +423,22 @@ update_caller_keys (fibheap_t heap, struct cgraph_node *node,
   bitmap_set_bit (updated_nodes, node->uid);
   node->global.estimated_growth = INT_MIN;
 
+  if (!node->local.inlinable)
+    return;
+  /* Prune out edges we won't inline into anymore.  */
+  if (!cgraph_default_inline_p (node, &failed_reason))
+    {
+      for (edge = node->callers; edge; edge = edge->next_caller)
+       if (edge->aux)
+         {
+           fibheap_delete_node (heap, edge->aux);
+           edge->aux = NULL;
+           if (edge->inline_failed)
+             edge->inline_failed = failed_reason;
+         }
+      return;
+    }
+
   for (edge = node->callers; edge; edge = edge->next_caller)
     if (edge->inline_failed)
       {