[PATCH] D62731: [RFC] Add support for options -fp-model= and -fp-speculation= : specify floating point behavior

Melanie Blower via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 27 10:11:12 PDT 2019


mibintc marked 2 inline comments as done.
mibintc added inline comments.


================
Comment at: clang/docs/UsersManual.rst:1305
+   and ``noexcept``. Note that -fp-model=[no]except can be combined with the
+   other three settings for this option. Details:
+
----------------
rjmccall wrote:
> Combined how?  With a comma?
> 
> This option seems to have two independent dimensions.  Is that necessary for command-line compatibility with ICC, or can we separate it into two options?
> 
> The documentation should mention the default behavior along both dimensions.  Is it possible to override a prior instance of this option to get this default behavior back?
> 
> You mention that this `-fp-model=fast` is equivalent to `-ffast-math`.  How does this option interact with that one if both are given on a command line?
> 
> Please put option text in backticks wherever it appears.
> 
> Most of these comments apply to `-fp-speculation` as well.
> Combined how? With a comma?

> This option seems to have two independent dimensions. Is that necessary for command-line compatibility with ICC, or can we separate it into two options?
Yes that's right, there are 2 dimensions.  I wrote it like this for identical compatibility with icc, and cl.exe also defines the option this way, to specify multiple values simultaneously. However I think it would be reasonable and good to split them into separate options.  I will discuss this with the folks back home.

> The documentation should mention the default behavior along both dimensions. 
I added this info into the doc

> Is it possible to override a prior instance of this option to get this default behavior back?
The 3 values along one dimension, precise, strict, fast if they appear multiple times in the command line, the last value will be the setting along that dimension.  Ditto with the other dimension, the rightmost occurrence of except or noexcept will be the setting. 

> You mention that this -fp-model=fast is equivalent to -ffast-math. How does this option interact with that one if both are given on a command line?
The idea is that they are synonyms so if either or both appeared on the command line, the effect would be identical. 

I'll upload another patch with a few documentation updates and get back to you about splitting the fp-model option into multiple options.  (Longer term, there are 2 other dimensions to fp-model)

And thanks for the review


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