[clang] [Driver] Introduce ffp-model=aggressive (PR #100453)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 30 10:23:03 PDT 2024


================
@@ -102,6 +102,16 @@ Deprecated Compiler Flags
 Modified Compiler Flags
 -----------------------
 
+- The ``-ffp-model`` option has been updated to enable a more limited set of
+  optimizations when the ``fast`` argument is used and to accept a new argument,
+  ``aggressive``. The behavior of ``-ffp-model=aggressive`` is equivalent
+  to the previous behavior of ``-ffp-model=fast``. The updated
+  ``-ffp-model=fast`` behavior no longer assumes finite math only, uses
+  the ``promoted`` algorithm for complex division when possible rather than the
+  less basic (limited range) algorithm, and sets
+  ``-ffp-contract=fast-honor-pragmas`` rather than ``-ffp-contract=fast``.
----------------
AaronBallman wrote:

FWIW, @andykaylor and I spoke about my concerns offline and I'm less concerned now. The silent behavior change is actually protecting the user from more aggressive optimizations they may not have intended to apply to their code anyway, so while it is a silent behavioral change, it's likely to be the better behavior for the most users, even if it's worse for a few users.

https://github.com/llvm/llvm-project/pull/100453


More information about the cfe-commits mailing list