[llvm] [LVI][SCCP][CVP] Add basic ConstantFPRange support (PR #111544)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 15 01:51:47 PDT 2025


nikic wrote:

It's surprising that adding the additional cases has such an impact. We should be able to improve on it.

Here is how the move constructor looks like now: https://clang.godbolt.org/z/ooMrdYMf3 Note that the dynamic dispatch between IEEEFloat and DoubleAPFloat has introduced so much code into the move ctor that it can't even be inlined anymore. Possibly moving the ConstantFPRange cases out of line would help to optimize the more common cases.

Another thing that stands out (though only tangentially related) is that the IEEEFloat/DoubleAPFloat dispatch that has to occur on every single APFloat operation requires an out of line call to fetch the PPCDoubleDouble() semantics :( I am curious why these are implemented as function calls returning a global, rather than directly exported globals.

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


More information about the llvm-commits mailing list