]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: [multiple changes]
authorRichard Biener <rguenther@suse.de>
Thu, 31 Jan 2019 12:05:19 +0000 (12:05 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 31 Jan 2019 12:05:19 +0000 (12:05 +0000)
2019-01-31  Richard Biener  <rguenther@suse.de>

Backport from mainline
2019-01-31  Richard Biener  <rguenther@suse.de>

PR rtl-optimization/89115
* lra.c (lra_rtx_hash): Properly hash CONST_INT values.

2019-01-30  Richard Biener  <rguenther@suse.de>

PR rtl-optimization/89115
* opts.c (default_options_optimization): Reduce
PARAM_MAX_DSE_ACTIVE_LOCAL_STORES by a factor of 10 at -O1.
Make PARAM_LOOP_INVARIANT_MAX_BBS_IN_LOOP reduction relative
to the default.

From-SVN: r268418

gcc/ChangeLog
gcc/lra.c
gcc/opts.c

index 99f9805eb8e6d5c1e6e51bd45f506d7366c31526..b74d9750b18e6a4c783f1cad82fdec931b4c28d8 100644 (file)
@@ -1,3 +1,19 @@
+2019-01-31  Richard Biener  <rguenther@suse.de>
+
+       Backport from mainline
+       2019-01-31  Richard Biener  <rguenther@suse.de>
+
+       PR rtl-optimization/89115
+       * lra.c (lra_rtx_hash): Properly hash CONST_INT values.
+
+       2019-01-30  Richard Biener  <rguenther@suse.de>
+
+       PR rtl-optimization/89115
+       * opts.c (default_options_optimization): Reduce
+       PARAM_MAX_DSE_ACTIVE_LOCAL_STORES by a factor of 10 at -O1.
+       Make PARAM_LOOP_INVARIANT_MAX_BBS_IN_LOOP reduction relative
+       to the default.
+
 2019-01-30  Kewen Lin  <linkw@gcc.gnu.org>
 
        Backport from mainline.
index a0c9797e2fdac24588f5a4fea439b52078557436..995aafc7d9fa0f422dd839666e2ed9d781b8a072 100644 (file)
--- a/gcc/lra.c
+++ b/gcc/lra.c
@@ -1670,10 +1670,12 @@ lra_rtx_hash (rtx x)
 
     case SCRATCH:
     case CONST_DOUBLE:
-    case CONST_INT:
     case CONST_VECTOR:
       return val;
 
+    case CONST_INT:
+      return val + UINTVAL (x);
+
     default:
       break;
     }
index e5126618f358d1e4d99355aa9d7aba06d28a6604..b98a0ca73a82c83b88a317f54dee47df753fd08e 100644 (file)
@@ -654,7 +654,16 @@ default_options_optimization (struct gcc_options *opts,
   /* For -O1 only do loop invariant motion for very small loops.  */
   maybe_set_param_value
     (PARAM_LOOP_INVARIANT_MAX_BBS_IN_LOOP,
-     opt2 ? default_param_value (PARAM_LOOP_INVARIANT_MAX_BBS_IN_LOOP) : 1000,
+     opt2 ? default_param_value (PARAM_LOOP_INVARIANT_MAX_BBS_IN_LOOP)
+     : default_param_value (PARAM_LOOP_INVARIANT_MAX_BBS_IN_LOOP) / 10,
+     opts->x_param_values, opts_set->x_param_values);
+
+  /* For -O1 reduce the maximum number of active local stores for RTL DSE
+     since this can consume huge amounts of memory (PR89115).  */
+  maybe_set_param_value
+    (PARAM_MAX_DSE_ACTIVE_LOCAL_STORES,
+     opt2 ? default_param_value (PARAM_MAX_DSE_ACTIVE_LOCAL_STORES)
+     : default_param_value (PARAM_MAX_DSE_ACTIVE_LOCAL_STORES) / 10,
      opts->x_param_values, opts_set->x_param_values);
 
   /* At -Ofast, allow store motion to introduce potential race conditions.  */