[llvm] [llvm] Lower latency bonus threshold in function specialization. (PR #143954)

Slava Zakharin via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 17 08:11:58 PDT 2025


vzakhari wrote:

> At first I thought that a 20% latency threshold is too low, but Nikita's comment seems reassuring. Looking at the related issue #143219 I am seeing that `digits_2` needs 34%, is that right? Do we perhaps prefer a higher number like 30%, or is it likely that will need to decrease it again in the future? Out of curiosity, what is the compile time impact if we completely disregard this metric (MinLatencySavings = 0) ?

The 34% bonus was reported only for the first iteration.  The following iterations (for the other constant values) reported less bonus.  I believe the lowest was about 21-22%, so I picked 20% to make sure all the specializations kick in and I get the performance back.

@nikic wouldn't it be too much trouble to remeasure the 0% threshold change?  If not, I will create a separate branch and send you the link. Thank you in advance!

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


More information about the llvm-commits mailing list