]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Disable add_store_equivs when -fno-expensive-optimizations
authorRichard Biener <rguenther@suse.de>
Tue, 24 Sep 2024 12:21:33 +0000 (14:21 +0200)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 25 Sep 2024 06:59:39 +0000 (08:59 +0200)
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.

gcc/ira.cc

index 156541df4e6c85592cf085b79d403235482af6a5..9950ccac70bb6680d19fd521e501d2df0f467a3c 100644 (file)
@@ -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 ();