diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2014-03-06 07:04:47 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@gcc.gnu.org> | 2014-03-06 07:04:47 +0000 |
commit | 80662856d25b4819a2323c1cbcdf35df85e3dfa2 (patch) | |
tree | 7c88872eda98772084be1027c3fdf66d0b9e5e39 /gcc/cselib.c | |
parent | 700bf0d312bfd3396b2b0262738be48886ac58a7 (diff) | |
download | gcc-80662856d25b4819a2323c1cbcdf35df85e3dfa2.zip gcc-80662856d25b4819a2323c1cbcdf35df85e3dfa2.tar.gz gcc-80662856d25b4819a2323c1cbcdf35df85e3dfa2.tar.bz2 |
re PR debug/60381 (ICE: in vt_expand_var_loc_chain, at var-tracking.c:8245)
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
Diffstat (limited to 'gcc/cselib.c')
-rw-r--r-- | gcc/cselib.c | 16 |
1 files changed, 7 insertions, 9 deletions
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 |