aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4ssa.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-11-25 23:35:34 +0100
committerLiang Qi <liang.qi@qt.io>2016-11-25 23:35:34 +0100
commitcc1c3d0e2be6dfea6befebdc5f25e519e3fe79b2 (patch)
treef160486b34c9157f42e12b23f2e0a3dd9aa2ef1b /src/qml/compiler/qv4ssa.cpp
parent7fa08472d32055a3d6e8b775b843f38ef65e9ce6 (diff)
parent4fae8ff1e73eeb48734b28a9c846fbdff1c2ffe1 (diff)
Merge remote-tracking branch 'origin/5.6' into 5.75.7
Conflicts: src/qml/compiler/qv4ssa.cpp src/qml/qml/v8/qqmlbuiltinfunctions.cpp src/quick/util/qquickprofiler_p.h Change-Id: I11a89c2a166115d6697adfba09928805643e709e
Diffstat (limited to 'src/qml/compiler/qv4ssa.cpp')
-rw-r--r--src/qml/compiler/qv4ssa.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/qml/compiler/qv4ssa.cpp b/src/qml/compiler/qv4ssa.cpp
index f021e1f760..fdda69e167 100644
--- a/src/qml/compiler/qv4ssa.cpp
+++ b/src/qml/compiler/qv4ssa.cpp
@@ -1857,11 +1857,6 @@ public:
return *this;
}
- bool isEmpty() const
- {
- return worklistSize == 0;
- }
-
unsigned size() const
{
return worklistSize;
@@ -1869,7 +1864,7 @@ public:
Stmt *takeNext(Stmt *last)
{
- if (isEmpty())
+ if (worklistSize == 0)
return 0;
const int startAt = last ? last->id() + 1 : 0;
@@ -1885,6 +1880,10 @@ public:
--worklistSize;
Stmt *s = stmts.at(pos);
Q_ASSERT(s);
+
+ if (removed.at(s->id()))
+ return takeNext(s);
+
return s;
}
@@ -3857,9 +3856,7 @@ void optimizeSSA(StatementWorklist &W, DefUses &defUses, DominatorTree &df)
ExprReplacer replaceUses(defUses, function);
Stmt *s = 0;
- while (!W.isEmpty()) {
- s = W.takeNext(s);
- Q_ASSERT(s);
+ while ((s = W.takeNext(s))) {
if (Phi *phi = s->asPhi()) {
// dead code elimination: