Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKunal Pathak <Kunal.Pathak@microsoft.com>2021-07-08 17:33:24 +0300
committerGitHub <noreply@github.com>2021-07-08 17:33:24 +0300
commit14035724e35e13114684ecff312b67b00517a75a (patch)
treed4469ea64476ae5f46356aaa1f6d20e1c1ec1a7e /src/coreclr/jit
parent885296a7da5f2699195df37e97e261f46d20faf2 (diff)
fix formatting errors (#55320)
Diffstat (limited to 'src/coreclr/jit')
-rw-r--r--src/coreclr/jit/lsra.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/coreclr/jit/lsra.cpp b/src/coreclr/jit/lsra.cpp
index ecd4dbd9e46..ddc54425174 100644
--- a/src/coreclr/jit/lsra.cpp
+++ b/src/coreclr/jit/lsra.cpp
@@ -11247,11 +11247,12 @@ void LinearScan::RegisterSelection::try_SPILL_COST()
spillCandidates &= ~spillCandidateBit;
regNumber spillCandidateRegNum = genRegNumFromMask(spillCandidateBit);
RegRecord* spillCandidateRegRecord = &linearScan->physRegs[spillCandidateRegNum];
+ Interval* assignedInterval = spillCandidateRegRecord->assignedInterval;
// Can and should the interval in this register be spilled for this one,
// if we don't find a better alternative?
if ((linearScan->getNextIntervalRef(spillCandidateRegNum, regType) == currentLocation) &&
- !spillCandidateRegRecord->assignedInterval->getNextRefPosition()->RegOptional())
+ !assignedInterval->getNextRefPosition()->RegOptional())
{
continue;
}
@@ -11261,17 +11262,15 @@ void LinearScan::RegisterSelection::try_SPILL_COST()
}
float currentSpillWeight = 0;
- RefPosition* recentRefPosition = spillCandidateRegRecord->assignedInterval != nullptr
- ? spillCandidateRegRecord->assignedInterval->recentRefPosition
- : nullptr;
- if ((recentRefPosition != nullptr) && (recentRefPosition->RegOptional() &&
- !(spillCandidateRegRecord->assignedInterval->isLocalVar && recentRefPosition->IsActualRef())))
+ RefPosition* recentRefPosition = assignedInterval != nullptr ? assignedInterval->recentRefPosition : nullptr;
+ if ((recentRefPosition != nullptr) &&
+ (recentRefPosition->RegOptional() && !(assignedInterval->isLocalVar && recentRefPosition->IsActualRef())))
{
// We do not "spillAfter" if previous (recent) refPosition was regOptional or if it
// is not an actual ref. In those cases, we will reload in future (next) refPosition.
// For such cases, consider the spill cost of next refposition.
// See notes in "spillInterval()".
- RefPosition* reloadRefPosition = spillCandidateRegRecord->assignedInterval->getNextRefPosition();
+ RefPosition* reloadRefPosition = assignedInterval->getNextRefPosition();
if (reloadRefPosition != nullptr)
{
currentSpillWeight = linearScan->getWeight(reloadRefPosition);