------- Comment #4 from jakub at gcc dot gnu dot org  2010-02-09 14:34 -------
Argh, this isn't going to be fun to fix.
The problem is:
2018  if (n_useless_values > MAX_USELESS_VALUES
2019      /* remove_useless_values is linear in the hash table size.  Avoid
2020         quadratic behavior for very large hashtables with very few
2021         useless elements.  */
2022      && (unsigned int)n_useless_values > cselib_hash_table->n_elements /
4)
2023    remove_useless_values ();

in cselib_process_insn.  As scheduling (but I bet other cselib users too,
though no idea if it can make a difference in that case) does call
cselib_process_insn
even on DEBUG_INSNs, n_useless_values and/or cselib_hash_table->n_elements can
differ between -g and -g0 compilations.  Either we'd need to ensure this
compaction is done at the same times (track number of useless values caused by
processing non-DEBUG_INSNs and similarly elements), or get_addr would need to
ignore useless, but not yet removed as useless, VALUEs, or something similar.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42977

Reply via email to