LSRA: Improve spill placement #6825
Labels
area-CodeGen-coreclr
CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
enhancement
Product code improvement that does NOT require public API changes/additions
optimization
tenet-performance
Performance related issue
Milestone
Currently an interval is always spilled at the most recent RefLocation, without looking for a better location to spill (e.g. possibly a post-dominating block that is likely to be less frequently executed).
When we spill a variable in a register, we always do so at its most recent reference. However, if we are now allocating for a different block, it may be cheaper to spill it at the top of the current block, or even one in-between which dominates this block (and which may be lower cost). This can be done by setting the incoming location to REG_STK (on the spill block and all intervening blocks, if any, between there and the current block). This is likely to require some tuning, and may require some additional machinery.
category:cq
theme:register-allocator
skill-level:expert
cost:large
impact:medium
The text was updated successfully, but these errors were encountered: