[cfe-commits] [PATCH] Add -ffp-contract option.

Lang Hames lhames at gmail.com
Mon Jul 2 14:43:43 PDT 2012

Hi All,

The attached patch adds a -ffp-contract=<style> option which (mostly)
follows the behavior of GCC's option. Styles are 'fast', for aggressive FMA
formation, 'on' for FP_CONTRACT compliance, and 'off' for no FMA formation
(in the future this might be relaxed to FMA formation in cases where the
result is provably unaffected).

Feedback would be welcome. In particular, I have toggled the fp-contract
style based on the ffast-math option in Clang::ConstructJob(...) in
lib/Driver/Tools.cpp. Is that the right place to do that kind of option
fiddling? (It seems to be where the other fast-math related floating point
options get handled).

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120702/98c95d38/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clang_ffp-contract.patch
Type: application/octet-stream
Size: 6762 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120702/98c95d38/attachment.obj>

More information about the cfe-commits mailing list