[clang] [Driver] Introduce ffp-model=aggressive (PR #100453)
Kevin P. Neal via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 12 07:43:24 PDT 2024
kpneal wrote:
Since you asked about "=strict", I don't think the strict model should change handling of excess precision. The rounding part of the constrained intrinsics shouldn't have any effect at all on excess precision. Eliminating excess precision also shouldn't happen with exception handling that isn't "default" since that would introduce exceptions (inexact, probably) that wouldn't be there normally since the excess precision is, I understand, allowed by the standard. Using the constrained intrinsics to indicate accessing the FP environment, but otherwise in the default FP environment, shouldn't have anything to do with excess precision.
Working backwards, having the "=strict" mode disable excess precision despite this not being a good idea with the constrained intrinsics would be surprising.
I also don't see how use of the constrained intrinsics indicates the program wants to be less accurate.
>From the POV of a programming language, it seems to me that the programmer shouldn't have to choose between accessing the FP environment or having excess precision that's allowed by the language.
>From the POV of clang command line arguments, the "=strict" mode is a combination of flags that disables some optimizations (like code movement) and generally makes the code more predictable. I don't think it follows that it should also, as a goal, reduce accuracy.
https://github.com/llvm/llvm-project/pull/100453
More information about the cfe-commits
mailing list