This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFD] -ffinite-math-only.
- From: Richard Henderson <rth at redhat dot com>
- To: Toon Moene <toon at moene dot indiv dot nluug dot nl>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 29 Jul 2002 15:59:56 -0700
- Subject: Re: [RFD] -ffinite-math-only.
- References: <3D4521E8.E1C4BF9D@moene.indiv.nluug.nl>
On Mon, Jul 29, 2002 at 01:07:20PM +0200, Toon Moene wrote:
> Often, one knows that a program won't generate (or consume) NaNs and
> Infinities; it would be nice if the compiler could be told about that fact.
Even if this weren't the case, it's somewhat nice to see it split
out from the flag_unsafe_math_optimizations blob.
Would you be interested in combing the remaining uses of
flag_unsafe_math_optimizations for things that ought to be
flag_finite_math_only or one of the HONOR_FOO macros?
I see two right away at combine.c:4776.
Also of interest would be to get x86 code to clear MASK_IEEE_FP
when NaNs are not of concern.
> * flags.h: Declare flag_finite_math_only.
> Use it in definition of HONOR_NANS and
> HONOR_INFINITIES.
> * toplev.c: Initialize flag_finite_math_only.
> (set_flags_fast_math): Set it on -ffast-math.
> (flag_fast_math_set_p): Test it.
> doc:
> * invoke.texi: Document -ffinite-math-only.
> f:
> * com.c (ffe_init_options): Set
> flag_finite_math_only.
> * invoke.texi: Document -fno-finite-math-only.
Ok.
r~