michele.scandale added inline comments.

================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:2337
+            << "-ffp-contract=fast";
+        optID = options::OPT_ffast_math;
+        FPModel = Val;
----------------
Here it seems you are changing `optID` to `OPT_ffast_math` to reuse the logic 
specified below for that case to reset the state of the floating point options.


================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:2345
+            << "-ffp-contract=fast";
+        optID = options::OPT_ffp_contract;
+        FPModel = Val;
----------------
Here the state of the floating point options seems unchanged except for 
`FPContract`. If I run `clang -ffp-model=fast -ffp-model=precise`, I would 
expect the state of the floating point options to match the one of 
`-fno-fast-math` except for `FPContract` which you want to be set to "fast".

I think you might need to replicate the reset for all the option here as well, 
so at this point I don't know how much worth is to use the optID reset trick 
for the "fast" case only.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D62731



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to