diff options
author | Erik Verbruggen <[email protected]> | 2014-01-30 13:15:52 +0100 |
---|---|---|
committer | The Qt Project <[email protected]> | 2014-01-31 10:34:23 +0100 |
commit | 445c15c3e52192d64b28a3d22ee4aeedbe715ba0 (patch) | |
tree | 3e052e69817f24b7ca38cfdae32553135313c444 /src/qml/compiler/qv4ssa.cpp | |
parent | 2d95e67ff4f00260d491255ed0b2af454235a047 (diff) |
V4: fix range sorting
When a life-time interval is split from another interval, it has to come
before an interval that starts at the same position but is not split.
This also means that a means that the all ranges in a split interval
are uses, which is important for allocation: all incoming parameters for
an operation need to be allocated before allocating a register for the
result as the result will only start its life "at the end" of the
operation.
This patch fixes a problem register allocation is done in a function
where register pressure is high (e.g. on platforms that have few
registers to start with). Specifically, crypto.js on x86 triggered it.
Change-Id: Iee3e5d82a887b8de573dfc23513844143d0c8073
Reviewed-by: Albert Astals Cid <[email protected]>
Reviewed-by: Simon Hausmann <[email protected]>
Reviewed-by: Fawzi Mohamed <[email protected]>
Reviewed-by: Lars Knoll <[email protected]>
Diffstat (limited to 'src/qml/compiler/qv4ssa.cpp')
-rw-r--r-- | src/qml/compiler/qv4ssa.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/qml/compiler/qv4ssa.cpp b/src/qml/compiler/qv4ssa.cpp index 44c93df4c9..594c38d109 100644 --- a/src/qml/compiler/qv4ssa.cpp +++ b/src/qml/compiler/qv4ssa.cpp @@ -3705,9 +3705,12 @@ void LifeTimeInterval::dump(QTextStream &out) const { } bool LifeTimeInterval::lessThan(const LifeTimeInterval &r1, const LifeTimeInterval &r2) { - if (r1._ranges.first().start == r2._ranges.first().start) - return r1._ranges.last().end < r2._ranges.last().end; - else + if (r1._ranges.first().start == r2._ranges.first().start) { + if (r1.isSplitFromInterval() == r2.isSplitFromInterval()) + return r1._ranges.last().end < r2._ranges.last().end; + else + return r1.isSplitFromInterval(); + } else return r1._ranges.first().start < r2._ranges.first().start; } |