C++ User's Guide

Values

If n is present, it must be 0, 1, or 2.

0

 

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2

Permit no simplifying assumptions. Preserve strict IEEE 754 conformance. 

 

Allow conservative simplification. The resulting code does not strictly conform to IEEE 754, but numeric results of most programs are unchanged. 

 

With -fsimple=1, the optimizer can assume the following:

  • IEEE754 default rounding/trapping modes do not change after process initialization.

  • Computation producing no visible result other than potential floating-point exceptions can be deleted.

  • Computation with infinities or NaNs as operands needs to propagate NaNs to their results; that is, x*0 can be replaced by 0.

  • Computations do not depend on sign of zero.

With -fsimple=1, the optimizer is not allowed to optimize completely without regard to roundoff or exceptions. In particular, a floating-point computation cannot be replaced by one that produces different results when rounding modes are held constant at runtime.

 

Permit aggressive floating-point optimization that can cause many programs to produce different numeric results due to changes in rounding. For example, permit the optimizer to replace all computations of x/y in a given loop with x*z, where x/y is guaranteed to be evaluated at least once in the loop z=1/y, and the values of y and z are known to have constant values during execution of the loop.