[llvm] [RegAllocEvictAdvisor] Add minimum weight ratio heuristic. (PR #98109)

Mikhail Gudim via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 9 22:48:17 PDT 2024


mgudim wrote:

@mtrofin @qcolombet 

This patch makes a lot of difference only on top of this: https://github.com/llvm/llvm-project/pull/90819
It actually gives good improvements in terms of dynamic instruction count on gcc and perlbench benchmarks.
I choose the number `7.5` by experimenting on xz where I originally had a degradation, but with 7.5 it's actually a slight improvement. Turned out the same `7.5` worked pretty well for the rest of the spec benchmarks. Perhaps a better number exists, but this needs a lot of experimentation. Maybe we should make the number architecture-dependent or even set it programatically depending on the code compiled? For now the value of `1.0` disables the heuristic by default.

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


More information about the llvm-commits mailing list