aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2024-09-24 14:21:33 +0200
committerRichard Biener <rguenth@gcc.gnu.org>2024-09-25 08:59:39 +0200
commit0b2d3bfa38ccce0dda46aba023f64440cc638496 (patch)
tree3c0de49c93a157bdeefe204186dcdeaf0c08b332
parentcaf3fe7880e62692da45489dc5bcae069c1555c8 (diff)
downloadgcc-0b2d3bfa38ccce0dda46aba023f64440cc638496.zip
gcc-0b2d3bfa38ccce0dda46aba023f64440cc638496.tar.gz
gcc-0b2d3bfa38ccce0dda46aba023f64440cc638496.tar.bz2
Disable add_store_equivs when -fno-expensive-optimizations
IRAs add_store_equivs is quadratic in the size of the function worst case, disable it when -fno-expensive-optimizations which means at -O1 and -Og. * ira.cc (ira): Gate add_store_equivs on flag_expensive_optimizations.
-rw-r--r--gcc/ira.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/ira.cc b/gcc/ira.cc
index 156541d..9950cca 100644
--- a/gcc/ira.cc
+++ b/gcc/ira.cc
@@ -5738,7 +5738,7 @@ ira (FILE *f)
combine_and_move_insns ();
/* Gather additional equivalences with memory. */
- if (optimize)
+ if (optimize && flag_expensive_optimizations)
add_store_equivs ();
loop_optimizer_finalize ();