https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63577
Jeffrey A. Law <law at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |law at redhat dot com
Summary|[4.9/5/6 Regression]: Huge |[4.9/5 Regression]: Huge
|compile time and memory |compile time and memory
|usage with -O and not -fPIC |usage with -O and not -fPIC
--- Comment #14 from Jeffrey A. Law <law at redhat dot com> ---
So two changes are responsible for huge improvements here.
First is Richi's fix for 63677:
2014-11-20 Richard Biener <[email protected]>
PR tree-optimization/63677
* tree-ssa-dom.c: Include gimplify.h for unshare_expr.
(avail_exprs_stack): Make a vector of pairs.
(struct hash_expr_elt): Replace stmt member with vop member.
(expr_elt_hasher::equal): Simplify.
(initialize_hash_element): Adjust.
(initialize_hash_element_from_expr): Likewise.
(dom_opt_dom_walker::thread_across_edge): Likewise.
(record_cond): Likewise.
(dom_opt_dom_walker::before_dom_children): Likewise.
(print_expr_hash_elt): Likewise.
(remove_local_expressions_from_table): Restore previous state
if requested.
(record_equivalences_from_stmt): Record &x + CST as constant
&MEM[&x, CST] for further propagation.
(vuse_eq): New function.
(lookup_avail_expr): For loads use the alias oracle to see
whether a candidate from the expr hash is usable.
(avail_expr_hash): Do not hash VUSEs.
* gcc.dg/tree-ssa/ssa-dom-cse-2.c: New testcase.
* gcc.dg/tree-ssa/ssa-dom-cse-3.c: Likewise.
Which reduces the memory consumption by ~.5G, presumably by simplifying things
in the tree optimizers, long before we get into the RTL bits.
Second is the introduction of the early DSE pass by Jan which removes another
1/2G of memory and the remaining time of significance in combine.
Author: hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Wed Apr 22 01:32:14 2015 +0000
PR ipa/65076
* passes.def (early_optimizations): Add pass_dse.
* g++.dg/tree-ssa/pr61034.C: Update template.
* g++.dg/warn/Warray-bounds.C: Harden for DSE.
* gcc.dg/Warray-bounds-11.c: Likewise.
* gcc.dg/Warray-bounds.c: Likewise.
I'm going to declare this regression fixed for gcc-6. Given the timing of the
two patches which helped here, it's a good bet that gcc-4.9 is, of course, bad
and that gcc-5 improved, but was still bad.