[RFD] -ffinite-math-only.
Richard Henderson
rth@redhat.com
Mon Jul 29 16:05:00 GMT 2002
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~
More information about the Gcc-patches
mailing list