[PATCH] D23840: New options -fexceptions-fp-math and -fdenormal-fp-math

James Molloy via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 26 01:33:15 PDT 2016


jmolloy added a comment.

Hi Sjoerd,

These make sense - we currently lack any way to inform the backend of the user's FP strictness requirements for exceptions and denormals which forces us to be conservative in the backend build attribute generation.

Your new -fno-exceptions-fp-math appears to be the same as GCC's "-ftrapping-math" which we already implement in the Driver. In fact, it looks like this code never passes -ftrapping-math through to CC1; it only uses it to determine if -menable-unsafe-fpmath should be set.

Therefore I think passing -ftrapping-math through to CC1 is the right thing here.

It seems to me that GCC doesn't have an equivalent flag to -fdenormal-fp-math, so inventing a flag sounds like the right thing to do. This patch should provide a docs patch for http://clang.llvm.org/docs/UsersManual.html#controlling-code-generation , which is generated from docs/UsersManual.rst.

Cheers,

James


https://reviews.llvm.org/D23840





More information about the cfe-commits mailing list