You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
LSRA: Heuristics for callee saved reg allocation. #6824
LSRA allocates callee saved register to the first var (preferenced to a callee saved reg) that is encountered in linear order. Later when a more deserving var is found needing a callee saved register LSRA won't take it back from a less deserving candidate.
Put another way, improve heuristic to decided when LSRA should not allocate at all to a var preferenced to a callee saved reg.
Specifically LSRA is conservative with fp vars.
Example benchmarks:
SciMark FFT
Huffman
MemoryPoolIterator:CopyFrom()
We want to tune our overall heuristics based on the experiments we do as part of #43318. While we will do the experiments in .NET 6, it is highly unlikely that we would bake that in produce during .NET 6. Moving to future.
Activity
kunalspathak commentedon Apr 9, 2021
We want to tune our overall heuristics based on the experiments we do as part of #43318. While we will do the experiments in .NET 6, it is highly unlikely that we would bake that in produce during .NET 6. Moving to future.
kunalspathak commentedon Dec 22, 2022
Currently, we do track local vars whose refCntWtd meets the threshold.
runtime/src/coreclr/jit/lsra.cpp
Lines 1837 to 1840 in 8d66372
Later, when LSRA allocates registers, we never go back and reset the assignment if any other variable deserves that register more.