Skip to content

LSRA: Improve spill placement #6825

@sivarv

Description

@sivarv

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIenhancementProduct code improvement that does NOT require public API changes/additionsoptimizationtenet-performancePerformance related issue

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions