Skip to content

Commit

Permalink
Some notes on setting singleDefSpill
Browse files Browse the repository at this point in the history
  • Loading branch information
kunalspathak committed Jul 1, 2021
1 parent a8fa9de commit e21876e
Showing 1 changed file with 4 additions and 4 deletions.
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

0 comments on commit e21876e

Please sign in to comment.