[PATCH] D62731: Add support for options -frounding-math, ftrapping-math, -fp-model=, and -fp-exception-behavior=, : Specify floating point behavior

Melanie Blower via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 29 12:54:55 PDT 2019


mibintc added inline comments.


================
Comment at: clang/include/clang/Basic/CodeGenOptions.def:238
 CODEGENOPT(UnsafeFPMath      , 1, 0) ///< Allow unsafe floating point optzns.
+CODEGENOPT(RoundingFPMath    , 1, 0) ///< Rounding floating point optzns.
 CODEGENOPT(UnwindTables      , 1, 0) ///< Emit unwind tables.
----------------
rjmccall wrote:
> Why do we need both a code-gen option and a language option?
The main reason i added it to LangOptions.h is because I saw the FPContract support in there and I thought I'd get on that bandwagon.  My ultimate goal, after committing the command line options, is to add support for controlling rounding mode and exception behavior with pragma's embedded in the functions, similar to https://reviews.llvm.org/D69272.  

There's a patch here that I like, to add rounding-mode and exception-behavior to FPOptions https://reviews.llvm.org/D65994, but it hasn't been committed yet.



Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62731/new/

https://reviews.llvm.org/D62731





More information about the cfe-commits mailing list