[PATCH] D78827: Add support for #pragma clang fp reassociate(on|off) -- floating point control of associative math transformations
Steve Canon via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon May 4 11:49:03 PDT 2020
scanon added inline comments.
================
Comment at: clang/docs/LanguageExtensions.rst:3182
+enabled for the translation unit with the ``-fassociative-math`` flag.
+The pragma can take two values: ``on`` and ``off``.
+
----------------
rjmccall wrote:
> Do you want to add an example here?
Is the intention that this allows reassociation only within statements (like fp contract on)? Based on the ir in the tests, I think the answer is "no".
If so, should "on" be called "fast" instead, since its semantics match the "fast" semantics for contract, and reserve "on" for reassociation within a statement (that seems like it would also be useful, potentially)?
Otherwise, please add some tests with multiple statements.
I agree with John that `pragma clang fp reassociate` is a reasonable spelling.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78827/new/
https://reviews.llvm.org/D78827
More information about the cfe-commits
mailing list