[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on
Melanie Blower via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 12 07:37:00 PST 2020
mibintc marked 2 inline comments as done.
mibintc added a comment.
some replies to Andy. I'll upload another patch here which passed check-all locally. then i'll re-commit it.
================
Comment at: clang/docs/UsersManual.rst:1388
- * ``precise`` Disables optimizations that are not value-safe on floating-point data, although FP contraction (FMA) is enabled (``-ffp-contract=fast``). This is the default behavior.
* ``strict`` Enables ``-frounding-math`` and ``-ffp-exception-behavior=strict``, and disables contractions (FMA). All of the ``-ffast-math`` enablements are disabled.
----------------
lebedev.ri wrote:
> I'm confused. Where in this patch the `This patch establishes the default option for -ffp-model to select "precise".` happens? LHS of diff says it is already default
yes you're right. sorry for the confusion. i changed the title and description
================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:2661
// the FPContract value has already been set to a string literal
// and the Val string isn't a pertinent value.
;
----------------
andrew.w.kaylor wrote:
> Does this mean that "-ffp-model=precise -ffp-contract=off" will leave FP contraction on? That doesn't seem right.
No. When -ffp-model=precise is on the command line, we end up here because the code above changes optID to ffp_contract, and sets FPContract to "on". The Val string will be "precise", and it shouldn't be checked. I'll change the comment.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74436/new/
https://reviews.llvm.org/D74436
More information about the cfe-commits
mailing list