On Jun 21, 2012, at 5:34 PM, Lang Hames <[email protected]> wrote:

> Hi Hal,
> 
> I object to 'never' because there may be cases in the future where we
> can determine that extra precision cannot change the result so we can
> use fma while maintaining strict standard compliance. 'strict' is much
> better.
> 
> That's two votes for 'strict'. I'm happy with that. :)
> 
> For an option whose job it is to set the default FP_CONTRACT state, I
> think that -ffp-contract=[no|yes|default] is the best. This makes the
> one-to-one correspondence clear to the user.
> 
> This flag isn't intended to set the default FP_CONTRACT behaviour, it's about 
> providing FMA formation modes outside those described by FP_CONTRACT, in 
> particular enabling aggressive formation of FMAs across expression 
> boundaries. I had intended enable this aggressve FMA formation under the 
> -fexcess-precision flag, but as Steve pointed out that flag is overly broad. 
> 
> So, proposal:
> 
> New flag: -ffuse-fp-ops={fast,standard,strict}.  Default value will be 
> 'standard', which means following FP_CONTRACT rules.
> 
> When -ffuse-fp-ops=fast we form FMAs wherever they're profitable, regardless 
> of the FP_CONTRACT state.
> When -ffuse-fp-ops=strict we form FMAs iff/when we can prove that the excess 
> precision won't change the result (which to start with will mean never 
> forming FMAs).
> 
> -ffast-math implies -ffuse-fp-ops=fast
> -fexcess-precision implies -ffuse-fp-ops=fast
> 
> Sound ok?

Sounds great!
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to