diff options
author | Andy Ayers <andya@microsoft.com> | 2018-01-29 12:36:38 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-29 12:36:38 -0800 |
commit | c3dd2610f0c6963b16ca27843942398271de7760 (patch) | |
tree | 767ab06153cdadb49f5d4f2a990acd931bf1af8c | |
parent | cb73944d6d159bd02adc29f0588b97f0f76da1a1 (diff) | |
download | coreclr-c3dd2610f0c6963b16ca27843942398271de7760.tar.gz coreclr-c3dd2610f0c6963b16ca27843942398271de7760.tar.bz2 coreclr-c3dd2610f0c6963b16ca27843942398271de7760.zip |
JIT: don't overlook strong nearby preference in LSRA (#16028)
When allocating an interval, LSRA will look at related intervals
for preference hints.
LSRA may look past a related interval I1 to its related interval
I2 if I1 looks like a simple copy. But if I1 has been previously
allocated then it seems we are often better served using I1's
preferences instead of using I2's.
Addresses some issues seen in #11390.
-rw-r--r-- | src/jit/lsra.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/jit/lsra.cpp b/src/jit/lsra.cpp index b6c8b96486..483d8dd1a2 100644 --- a/src/jit/lsra.cpp +++ b/src/jit/lsra.cpp @@ -5308,8 +5308,8 @@ regNumber LinearScan::tryAllocateFreeReg(Interval* currentInterval, RefPosition* { relatedInterval = nullptr; } - // Is the relatedInterval simply a copy to another relatedInterval? - else if ((relatedInterval->relatedInterval != nullptr) && + // Is the relatedInterval not assigned and simply a copy to another relatedInterval? + else if ((relatedInterval->assignedReg == nullptr) && (relatedInterval->relatedInterval != nullptr) && (nextRelatedRefPosition->nextRefPosition != nullptr) && (nextRelatedRefPosition->nextRefPosition->nextRefPosition == nullptr) && (nextRelatedRefPosition->nextRefPosition->nodeLocation < |