summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHyung-Kyu Choi <hk0110.choi@samsung.com>2017-05-31 12:24:19 +0900
committerHyung-Kyu Choi <hk0110.choi@samsung.com>2017-05-31 12:28:32 +0900
commitf72202cfbb6414f1767f973797c167e77cb82923 (patch)
tree8163ff153287713dfa348a8bf4e89db020ef6c59
parent70f9e1c771707535c32bfef7df435c896438a01a (diff)
downloadcoreclr-f72202cfbb6414f1767f973797c167e77cb82923.tar.gz
coreclr-f72202cfbb6414f1767f973797c167e77cb82923.tar.bz2
coreclr-f72202cfbb6414f1767f973797c167e77cb82923.zip
[RyuJIT/ARM32] Applying review feedback
- Use canRestorePreviousInterval() for all target - Update condition for restoring TYP_DOUBLE interval Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
-rw-r--r--src/jit/lsra.cpp14
-rw-r--r--src/jit/lsra.h2
2 files changed, 6 insertions, 10 deletions
diff --git a/src/jit/lsra.cpp b/src/jit/lsra.cpp
index 52680cf051..c2a5fcf88a 100644
--- a/src/jit/lsra.cpp
+++ b/src/jit/lsra.cpp
@@ -6448,13 +6448,7 @@ void LinearScan::unassignPhysReg(RegRecord* regRec, RefPosition* spillRefPositio
{
assignedInterval->assignedReg = regRec;
}
-#ifdef _TARGET_ARM_
else if (canRestorePreviousInterval(regRec, assignedInterval))
-#else
- else if (regRec->previousInterval != nullptr && regRec->previousInterval != assignedInterval &&
- regRec->previousInterval->assignedReg == regRec &&
- regRec->previousInterval->getNextRefPosition() != nullptr)
-#endif
{
regRec->assignedInterval = regRec->previousInterval;
regRec->previousInterval = nullptr;
@@ -6657,6 +6651,7 @@ bool LinearScan::isSecondHalfReg(RegRecord* regRec, Interval* interval)
return false;
}
+#endif
//--------------------------------------------------------------------------------------
// canRestorePreviousInterval: Test if we can restore previous interval
@@ -6677,17 +6672,18 @@ bool LinearScan::canRestorePreviousInterval(RegRecord* regRec, Interval* assigne
(regRec->previousInterval != nullptr && regRec->previousInterval != assignedInterval &&
regRec->previousInterval->assignedReg == regRec && regRec->previousInterval->getNextRefPosition() != nullptr);
+#ifdef _TARGET_ARM_
if (retVal && regRec->previousInterval->registerType == TYP_DOUBLE)
{
regNumber nextRegNum = REG_NEXT(regRec->regNum);
RegRecord* nextRegRec = getRegisterRecord(nextRegNum);
- retVal = retVal &&
- (nextRegRec->assignedInterval == nullptr && regRec->previousInterval == nextRegRec->previousInterval);
+ retVal = retVal && nextRegRec->assignedInterval == nullptr;
}
+#endif
+
return retVal;
}
-#endif
//------------------------------------------------------------------------
// processBlockStartLocations: Update var locations on entry to 'currentBlock'
diff --git a/src/jit/lsra.h b/src/jit/lsra.h
index 68d9eb14b1..aab034b2e4 100644
--- a/src/jit/lsra.h
+++ b/src/jit/lsra.h
@@ -696,8 +696,8 @@ private:
#ifdef _TARGET_ARM_
bool isSecondHalfReg(RegRecord* regRec, Interval* interval);
- bool LinearScan::canRestorePreviousInterval(RegRecord* regRec, Interval* assignedInterval);
#endif
+ bool canRestorePreviousInterval(RegRecord* regRec, Interval* assignedInterval);
RefType CheckBlockType(BasicBlock* block, BasicBlock* prevBlock);