From: aoliva Date: Thu, 6 Mar 2014 07:04:47 +0000 (+0000) Subject: PR debug/60381 X-Git-Tag: upstream/4.9.2~742 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c6fbbd72dfc07e6a47a789f99ae8b8427193164f;p=platform%2Fupstream%2Flinaro-gcc.git PR debug/60381 Revert: 2014-02-28 Alexandre Oliva PR debug/59992 * cselib.c (remove_useless_values): Skip to avoid quadratic behavior if the condition moved from... (cselib_process_insn): ... here holds. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208361 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b71499d..f231dd4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2014-03-06 Alexandre Oliva + + PR debug/60381 + Revert: + 2014-02-28 Alexandre Oliva + PR debug/59992 + * cselib.c (remove_useless_values): Skip to avoid quadratic + behavior if the condition moved from... + (cselib_process_insn): ... here holds. + 2014-03-05 Jakub Jelinek PR plugins/59335 diff --git a/gcc/cselib.c b/gcc/cselib.c index 0fcfe28..4dfc557 100644 --- a/gcc/cselib.c +++ b/gcc/cselib.c @@ -681,14 +681,6 @@ remove_useless_values (void) { cselib_val **p, *v; - if (n_useless_values <= MAX_USELESS_VALUES - /* remove_useless_values is linear in the hash table size. Avoid - quadratic behavior for very large hashtables with very few - useless elements. */ - || ((unsigned int)n_useless_values - <= (cselib_hash_table.elements () - n_debug_values) / 4)) - return; - /* First pass: eliminate locations that reference the value. That in turn can make more values useless. */ do @@ -2720,7 +2712,13 @@ cselib_process_insn (rtx insn) cselib_current_insn = NULL_RTX; - remove_useless_values (); + if (n_useless_values > MAX_USELESS_VALUES + /* remove_useless_values is linear in the hash table size. Avoid + quadratic behavior for very large hashtables with very few + useless elements. */ + && ((unsigned int)n_useless_values + > (cselib_hash_table.elements () - n_debug_values) / 4)) + remove_useless_values (); } /* Initialize cselib for one pass. The caller must also call