diff options
author | Erik Verbruggen <[email protected]> | 2014-01-28 13:01:12 +0100 |
---|---|---|
committer | The Qt Project <[email protected]> | 2014-02-07 10:44:45 +0100 |
commit | 412f22f15ac13d678d018763aafad134ee02e872 (patch) | |
tree | 112cd72132459b9861bb741c3e352637ac1d4e23 /src/qml/compiler/qv4ssa.cpp | |
parent | b4883080781f3ea68e4a688821d353a321c39f95 (diff) |
V4: fix life range for phi node target that is never used.
When a temp is defined by a phi-node, but never used, still insert the
(very short) life range.
Change-Id: Ia976f496736a1606108fab7597c5d90048d9d55a
Reviewed-by: Lars Knoll <[email protected]>
Diffstat (limited to 'src/qml/compiler/qv4ssa.cpp')
-rw-r--r-- | src/qml/compiler/qv4ssa.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/qml/compiler/qv4ssa.cpp b/src/qml/compiler/qv4ssa.cpp index 44c93df4c9..d9cc51fc82 100644 --- a/src/qml/compiler/qv4ssa.cpp +++ b/src/qml/compiler/qv4ssa.cpp @@ -3552,7 +3552,13 @@ private: for (int i = bb->statements.size() - 1; i >= 0; --i) { Stmt *s = bb->statements[i]; if (Phi *phi = s->asPhi()) { - live.remove(*phi->targetTemp); + LiveRegs::iterator it = live.find(*phi->targetTemp); + if (it == live.end()) { + // a phi node target that is only defined, but never used + _intervals[*phi->targetTemp].setFrom(s); + } else { + live.erase(it); + } continue; } collector.collect(s); |