Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use singleDefSpill information in getWeight()
  • Loading branch information
kunalspathak committed Jul 9, 2021
commit d792cfc5e71dd9dad567d37cbe42516d1ccfd094
2 changes: 1 addition & 1 deletion src/coreclr/jit/lsra.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ BasicBlock::weight_t LinearScan::getWeight(RefPosition* refPos)
if (refPos->getInterval()->isSpilled)
{
// Decrease the weight if the interval has already been spilled.
if (varDsc->lvLiveInOutOfHndlr || varDsc->lvSpillAtSingleDef)
if (varDsc->lvLiveInOutOfHndlr || refPos->getInterval()->firstRefPosition->singleDefSpill)
{
// An EH-var/single-def is always spilled at defs, and we'll decrease the weight by half,
// since only the reload is needed.
Expand Down