diff options
author | Erik Verbruggen <erik.verbruggen@me.com> | 2013-12-17 12:44:07 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-02 21:47:25 +0100 |
commit | a588c1a5038cf2b4e22101d360fcae20531d905f (patch) | |
tree | c148dcb6b9edb5e583f798dc3b1f989a33f09dad /src/qml | |
parent | d54fb6804b261a26a2b689d2e7e5157b545e3c86 (diff) |
V4 IR: do not add unconditional jumps to work lists
Both type inference and the optimization pass do not do anything with
unconditional jumps. So, instead of adding them to the worklist and
later on removing them again, it’s faster to never add them in the first
place.
Change-Id: Ib81d43e9ea6df2b1a70e9dd1e9b9c29cb6d345d2
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml')
-rw-r--r-- | src/qml/compiler/qv4ssa.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/qml/compiler/qv4ssa.cpp b/src/qml/compiler/qv4ssa.cpp index 5e1122e18b..b340cc9527 100644 --- a/src/qml/compiler/qv4ssa.cpp +++ b/src/qml/compiler/qv4ssa.cpp @@ -1636,7 +1636,8 @@ public: BasicBlock *bb = function->basicBlocks[i]; if (i == 0 || !bb->in.isEmpty()) foreach (Stmt *s, bb->statements) - _worklist.insert(s); + if (!s->asJump()) + _worklist.insert(s); } while (!_worklist.isEmpty()) { @@ -2886,6 +2887,8 @@ void optimizeSSA(Function *function, DefUsesCalculator &defUses) foreach (BasicBlock *bb, function->basicBlocks) { for (int i = 0, ei = bb->statements.size(); i != ei; ++i) { Stmt **s = &bb->statements[i]; + if ((*s)->asJump()) + continue; // nothing do do there W.append(*s); ref.insert(*s, s); } |