Skip to content

Commit 1403572

Browse files
authored
fix formatting errors (#55320)
1 parent 885296a commit 1403572

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/coreclr/jit/lsra.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11247,11 +11247,12 @@ void LinearScan::RegisterSelection::try_SPILL_COST()
1124711247
spillCandidates &= ~spillCandidateBit;
1124811248
regNumber spillCandidateRegNum = genRegNumFromMask(spillCandidateBit);
1124911249
RegRecord* spillCandidateRegRecord = &linearScan->physRegs[spillCandidateRegNum];
11250+
Interval* assignedInterval = spillCandidateRegRecord->assignedInterval;
1125011251

1125111252
// Can and should the interval in this register be spilled for this one,
1125211253
// if we don't find a better alternative?
1125311254
if ((linearScan->getNextIntervalRef(spillCandidateRegNum, regType) == currentLocation) &&
11254-
!spillCandidateRegRecord->assignedInterval->getNextRefPosition()->RegOptional())
11255+
!assignedInterval->getNextRefPosition()->RegOptional())
1125511256
{
1125611257
continue;
1125711258
}
@@ -11261,17 +11262,15 @@ void LinearScan::RegisterSelection::try_SPILL_COST()
1126111262
}
1126211263

1126311264
float currentSpillWeight = 0;
11264-
RefPosition* recentRefPosition = spillCandidateRegRecord->assignedInterval != nullptr
11265-
? spillCandidateRegRecord->assignedInterval->recentRefPosition
11266-
: nullptr;
11267-
if ((recentRefPosition != nullptr) && (recentRefPosition->RegOptional() &&
11268-
!(spillCandidateRegRecord->assignedInterval->isLocalVar && recentRefPosition->IsActualRef())))
11265+
RefPosition* recentRefPosition = assignedInterval != nullptr ? assignedInterval->recentRefPosition : nullptr;
11266+
if ((recentRefPosition != nullptr) &&
11267+
(recentRefPosition->RegOptional() && !(assignedInterval->isLocalVar && recentRefPosition->IsActualRef())))
1126911268
{
1127011269
// We do not "spillAfter" if previous (recent) refPosition was regOptional or if it
1127111270
// is not an actual ref. In those cases, we will reload in future (next) refPosition.
1127211271
// For such cases, consider the spill cost of next refposition.
1127311272
// See notes in "spillInterval()".
11274-
RefPosition* reloadRefPosition = spillCandidateRegRecord->assignedInterval->getNextRefPosition();
11273+
RefPosition* reloadRefPosition = assignedInterval->getNextRefPosition();
1127511274
if (reloadRefPosition != nullptr)
1127611275
{
1127711276
currentSpillWeight = linearScan->getWeight(reloadRefPosition);

0 commit comments

Comments
 (0)