This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Bump max-ssa-name-query-depth default (PR c/69918)


On Tue, 23 Feb 2016, Jakub Jelinek wrote:

> Hi!
> 
> As mentioned in the PR, the builtin-integral-1.c testcase fails on
> i?86 Solaris.  The problem is that on Solaris the dg-add-options c99_runtime 
> adds -std=c99, which turns -fexcess-precision=standard, and that on some
> arches changes
>   _388 = (double) i1_63(D);
>   _389 = (double) i2_335(D);
>   _390 = _388 * _389;
>   _391 = (long double) _390;
>   _392 = __builtin_ceill (_391);
> into
>   _398 = (double) i1_63(D);
>   _399 = (long double) _398;
>   _400 = (double) i2_335(D);
>   _401 = (long double) _400;
>   _402 = _399 * _401;
>   _403 = __builtin_ceill (_402);
> But the default value of the max-ssa-name-query-depth param prevents in this
> case from recognizing the argument to __builtin_ciell will always be
> integral value.  We have the possibility to either tweak the testcase
> (e.g. add -fexcess-precision=fast, or --param max-ssa-name-query-depth=3),
> or change the IMHO way too low default.  As only the latter will help
> for excess precision code in real-world even for simple addition of two
> values, I think it is best to bump the default.  Perhaps even 5 wouldn't
> hurt, but maybe we can increase it more for gcc 7.

Note that as we do not limit the number of PHI args to visit the
actual number of lookups can be unbound already, it's generally
O(max-depth^N) with N being the max number of operands in a stmt.

I suppose another max-phi-args-query parameter would be good to
limit this to max-depth^2 in practice.

> Bootstrapped/regtested on x86_64-linux and i686-linux, tested on the
> testcase using cross to i386-pc-solaris2.11.  Ok for trunk?

Ok.

Thanks,
Richard.

> 2016-02-23  Jakub Jelinek  <jakub@redhat.com>
> 
> 	PR c/69918
> 	* params.def (PARAM_MAX_SSA_NAME_QUERY_DEPTH): Bump default from
> 	2 to 3.
> 
> --- gcc/params.def.jj	2016-02-01 23:34:34.000000000 +0100
> +++ gcc/params.def	2016-02-23 18:43:04.359322654 +0100
> @@ -1191,7 +1191,7 @@ DEFPARAM (PARAM_MAX_SSA_NAME_QUERY_DEPTH
>  	  "max-ssa-name-query-depth",
>  	  "Maximum recursion depth allowed when querying a property of an"
>  	  " SSA name.",
> -	  2, 1, 0)
> +	  3, 1, 0)
>  
>  DEFPARAM (PARAM_MAX_RTL_IF_CONVERSION_INSNS,
>  	  "max-rtl-if-conversion-insns",
> 
> 	Jakub
> 
> 

-- 
Richard Biener <rguenther@suse.de>
SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nuernberg)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]