[llvm] [FuncSpec] Improve handling of Comparison Instructions (PR #114073)

Hari Limaye via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 31 03:05:00 PDT 2024


hazzlim wrote:

> Hey @hazzlim, the patch looks good.
> 
> Regarding teaching the InstConstVisitor about constant ranges I agree with you that it is probably not worth it. It then becomes a full blown lattice value solver like the SCCPSolver. The point is to keep it minimal for estimation purposes only, not full analysis.
> 
> > For example it improves the estimation of the CodeSize bonus for a specialization of the function digits_2 from the SPEC2k17 benchmark exchange2, increasing this from 23% to 71%
> 
> Cool! Does that mean we can boost the thresholds a bit?

Nice, thank you for reviewing :)

RE thresholds, I think so - in combination with #114247 I think this lets us boost the CodeSize threshold a fair bit from the current value of 20%. I think we could potentially then remove the Latency component of the Bonus as a result, although I do need to run some more tests for this to see if it would be reasonable.

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


More information about the llvm-commits mailing list