From: Richard Biener Date: Tue, 24 Sep 2024 12:21:33 +0000 (+0200) Subject: Disable add_store_equivs when -fno-expensive-optimizations X-Git-Tag: basepoints/gcc-16~5700 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0b2d3bfa38ccce0dda46aba023f64440cc638496;p=thirdparty%2Fgcc.git 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. --- diff --git a/gcc/ira.cc b/gcc/ira.cc index 156541df4e6..9950ccac70b 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 ();