diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-05-01 12:44:51 +0200 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-05-01 12:44:51 +0200 |
commit | b78372c4ba31da2d941d70ba23a927deae7d830c (patch) | |
tree | 25d9eeefbbb4c6ace084c56e58ac7bd1927217b5 /src/qml/jit/qv4regalloc.cpp | |
parent | 9990c0f577f6a6a67ccebffb56ad1afc7a98ed1d (diff) | |
parent | 7ea1f75fd877f312d70a90ab0405f3ca03914171 (diff) |
Merge remote-tracking branch 'origin/release' into stable
Change-Id: I996a85744753598bb48c7e0d7954049202f4f037
Diffstat (limited to 'src/qml/jit/qv4regalloc.cpp')
-rw-r--r-- | src/qml/jit/qv4regalloc.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/qml/jit/qv4regalloc.cpp b/src/qml/jit/qv4regalloc.cpp index a06d3710e7..b5765cd589 100644 --- a/src/qml/jit/qv4regalloc.cpp +++ b/src/qml/jit/qv4regalloc.cpp @@ -1233,6 +1233,10 @@ void RegisterAllocator::linearScan() Q_ASSERT(!current.isFixedInterval()); +#ifdef DEBUG_REGALLOC + qDebug() << "** Position" << position; +#endif // DEBUG_REGALLOC + if (_info->canHaveRegister(current.temp())) { tryAllocateFreeReg(current, position); if (current.reg() == LifeTimeInterval::Invalid) @@ -1385,11 +1389,15 @@ void RegisterAllocator::allocateBlockedReg(LifeTimeInterval ¤t, const int QVector<LifeTimeInterval *> nextUseRangeForReg(nextUsePos.size(), 0); Q_ASSERT(nextUsePos.size() > 0); + const bool definedAtCurrentPosition = !current.isSplitFromInterval() && current.start() == position; + for (int i = 0, ei = _active.size(); i != ei; ++i) { LifeTimeInterval &it = _active[i]; if (it.isFP() == needsFPReg) { int nu = it.isFixedInterval() ? 0 : nextUse(it.temp(), current.firstPossibleUsePosition(isPhiTarget)); - if (nu != -1 && nu < nextUsePos[it.reg()]) { + if (nu == position && !definedAtCurrentPosition) { + nextUsePos[it.reg()] = 0; + } else if (nu != -1 && nu < nextUsePos[it.reg()]) { nextUsePos[it.reg()] = nu; nextUseRangeForReg[it.reg()] = ⁢ } else if (nu == -1 && nextUsePos[it.reg()] == INT_MAX) { |