Skip to content

Commit e21876e

Browse files
committed
Some notes on setting singleDefSpill
1 parent a8fa9de commit e21876e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/coreclr/jit/lsra.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1795,7 +1795,7 @@ void LinearScan::identifyCandidates()
17951795
if (varDsc->lvLiveInOutOfHndlr)
17961796
{
17971797
newInt->isWriteThru = varDsc->lvSingleDefRegCandidate;
1798-
setIntervalAsSpilled(newInt); // TODO: Explore what happens if we mark interval as spilled right here.
1798+
setIntervalAsSpilled(newInt);
17991799
}
18001800

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

0 commit comments

Comments
 (0)