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
Some notes on setting singleDefSpill
  • Loading branch information
kunalspathak committed Jul 9, 2021
commit e3383c11769f88109137d55d3b0d83e656f7e9e6
8 changes: 4 additions & 4 deletions src/coreclr/jit/lsra.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1795,7 +1795,7 @@ void LinearScan::identifyCandidates()
if (varDsc->lvLiveInOutOfHndlr)
{
newInt->isWriteThru = varDsc->lvSingleDefRegCandidate;
setIntervalAsSpilled(newInt); // TODO: Explore what happens if we mark interval as spilled right here.
setIntervalAsSpilled(newInt);
}

INTRACK_STATS(regCandidateVarCount++);
Expand Down Expand Up @@ -3285,9 +3285,9 @@ void LinearScan::spillInterval(Interval* interval, RefPosition* fromRefPosition
if (interval->isSingleDef && RefTypeIsDef(interval->firstRefPosition->refType) &&
!interval->firstRefPosition->spillAfter)
{
//TODO: Check if it is beneficial to spill at def, meaning, is it in hot block and if yes, don't worry about
// doing the spill....
// Also check how many uses are present for this variable. If USE > 3, then only do this optimization.
// TODO-CQ: Check if it is beneficial to spill at def, meaning, if it is a hot block don't worry about
// doing the spill. Another option is to track number of refpositions and a interval has more than X refpositions
// then perform this optimization.
interval->firstRefPosition->singleDefSpill = true;
}

Expand Down