re PR debug/60381 (ICE: in vt_expand_var_loc_chain, at var-tracking.c:8245)
authorAlexandre Oliva <aoliva@redhat.com>
Thu, 6 Mar 2014 07:04:47 +0000 (07:04 +0000)
committerAlexandre Oliva <aoliva@gcc.gnu.org>
Thu, 6 Mar 2014 07:04:47 +0000 (07:04 +0000)
PR debug/60381
Revert:
2014-02-28  Alexandre Oliva <aoliva@redhat.com>
PR debug/59992
* cselib.c (remove_useless_values): Skip to avoid quadratic
behavior if the condition moved from...
(cselib_process_insn): ... here holds.

From-SVN: r208361

gcc/ChangeLog
gcc/cselib.c

index b71499da442ef1ccea3a6d600345de8f464e1b7f..f231dd4f8d9a8a9b644abce5847f9b19a02a757f 100644 (file)
@@ -1,3 +1,13 @@
+2014-03-06  Alexandre Oliva <aoliva@redhat.com>
+
+       PR debug/60381
+       Revert:
+       2014-02-28  Alexandre Oliva <aoliva@redhat.com>
+       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  <jakub@redhat.com>
 
        PR plugins/59335
index 0fcfe285eb515373f35e4da68d552936e2604dfe..4dfc55778b9236fe62581ef39b76264c30645cf4 100644 (file)
@@ -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