From f10d1a747d57ce28acd2b83ce96c154af5e9a286 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Mon, 24 Jul 2006 13:23:21 +0200 Subject: [PATCH] re PR middle-end/28071 (A file that can not be compiled in reasonable time/space) PR rtl-optimization/28071 * ipa-inline.c (update_caller_keys): Remove edges that are no longer inline candidates. From-SVN: r115712 --- gcc/ChangeLog | 6 ++++++ gcc/ipa-inline.c | 17 +++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 415a58ac267..2151f0a6c37 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2006-07-24 Jan Hubicka + + PR rtl-optimization/28071 + * ipa-inline.c (update_caller_keys): Remove edges that + are no longer inline candidates. + 2006-07-23 Daniel Jacobowitz PR debug/27473 diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c index 0ffbd1272de..d2cdce2b0ea 100644 --- a/gcc/ipa-inline.c +++ b/gcc/ipa-inline.c @@ -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) { -- 2.30.2