-ffast-math and floating point reordering

Chris Lattner sabre@nondot.org
Fri Mar 26 22:27:00 GMT 2004


On Fri, 26 Mar 2004, Chris Lattner wrote:
> Okay, first, you must understand that LLVM is under vastly different
> constraints than GCC is.  It makes little sense to have a -ffast-math mode
> in LLVM.  What would happen when you link two .o files with different
> settings?  At best the flag would just be cleared.

Oh, one other thing that I should have pointed out: when LLVM has support
for this, the C front-end will turn floating point adds into the strictadd
by default.  If -ffast-math is presented to the C front-end, the C
front-end will generate the non-strict adds instead.  This allows us to
use the *information* from the -ffast-math flag, without having to
actually preserve it in the LLVM files.

-Chris

-- 
http://llvm.cs.uiuc.edu/
http://www.nondot.org/~sabre/Projects/



More information about the Gcc mailing list