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

Andy Kaylor via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 25 11:48:13 PDT 2024


andykaylor wrote:

> It seems a bit confusing to me to create a situation where `-ffast-math` is equivalent to `-ffp-model=aggressive`, not `-ffp-model=fast`.

I can understand that, but the problem I'm trying to fix is that the naming of fast-math options we inherited from gcc is counter-intuitive. Do you want "fast math" or "unsafe math"? Which one sounds riskier? This is a lot like the `-Ofast` problem. I'm not sure consistency with the gcc option naming is a good thing.

My goal here is to have two options, one with a moderate approach to fast-math optimizations and one with a more aggressive approach. I'm not particular attached to the naming I have proposed here. Historically (for almost 20 years), the Intel compilers have supported this using `-fp-model fast[=1]` and `-fp-model fast=2`. I don't like that naming, so I attempted something I thought was better when proposing the same sort of split for clang.

Do you have a suggestion for better names?

How about "fast" and "useful"? ;-)

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


More information about the cfe-commits mailing list