From: Richard Biener Date: Thu, 31 Jan 2019 12:05:19 +0000 (+0000) Subject: backport: [multiple changes] X-Git-Tag: releases/gcc-7.5.0~624 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fb8700b9b46728a163cf688c8606a88db9b0b185;p=thirdparty%2Fgcc.git backport: [multiple changes] 2019-01-31 Richard Biener Backport from mainline 2019-01-31 Richard Biener PR rtl-optimization/89115 * lra.c (lra_rtx_hash): Properly hash CONST_INT values. 2019-01-30 Richard Biener 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 99f9805eb8e6..b74d9750b18e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,19 @@ +2019-01-31 Richard Biener + + Backport from mainline + 2019-01-31 Richard Biener + + PR rtl-optimization/89115 + * lra.c (lra_rtx_hash): Properly hash CONST_INT values. + + 2019-01-30 Richard Biener + + 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 Backport from mainline. diff --git a/gcc/lra.c b/gcc/lra.c index a0c9797e2fda..995aafc7d9fa 100644 --- 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; } diff --git a/gcc/opts.c b/gcc/opts.c index e5126618f358..b98a0ca73a82 100644 --- a/gcc/opts.c +++ b/gcc/opts.c @@ -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. */