diff options
author | Erik Verbruggen <erik.verbruggen@me.com> | 2013-08-27 15:10:51 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-08-28 20:22:02 +0200 |
commit | 01f3a34eda0a6045db76c703b4c2683b7600fb60 (patch) | |
tree | fbd55dbcfa3a61c99cf4dec643c8d80260cf1c4a /src/qml | |
parent | 23919b35ca9b89caf9c767635b966cae117f52d2 (diff) |
V4 regalloc: do not overwrite register availability in hole.
When a fixed interval for a register is inactive, the register is free
until that interval becomes active, or (and this was missing), until
another interval uses it before that position. So instead of blindly
overwriting the freeUntilPos, take the qMin of the existing one with
the intersection position.
Change-Id: I2730a748ef1e46b4782fbb9814e800eca52172f0
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml')
-rw-r--r-- | src/qml/compiler/qv4regalloc.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/compiler/qv4regalloc.cpp b/src/qml/compiler/qv4regalloc.cpp index d2f2fe318b..ddac257d1a 100644 --- a/src/qml/compiler/qv4regalloc.cpp +++ b/src/qml/compiler/qv4regalloc.cpp @@ -1312,7 +1312,7 @@ void RegisterAllocator::tryAllocateFreeReg(LifeTimeInterval ¤t, const int if (it.isFP() == needsFPReg && it.reg() != LifeTimeInterval::Invalid) { const int intersectionPos = nextIntersection(current, it, position); if (!isPhiTarget && it.isFixedInterval() && current.end() == intersectionPos) - freeUntilPos[it.reg()] = intersectionPos + 1; + freeUntilPos[it.reg()] = qMin(freeUntilPos[it.reg()], intersectionPos + 1); else if (intersectionPos != -1) freeUntilPos[it.reg()] = qMin(freeUntilPos[it.reg()], intersectionPos); } |