aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@me.com>2013-12-16 14:38:45 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-12-19 11:21:39 +0100
commit61d982d601fa563fa53f527b8db4aceab5b47b2b (patch)
treea971a4a6318f012aa799b040e7c5fc5293b57e1d /src/qml/compiler
parent59396165f9efae042c6a5395cfbd3f861d12fbb5 (diff)
V4 SSA: add some more literature references.
Also fixed some comments. Change-Id: I4aedff84bdbf8de248025bc48805a859704bdd8a Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/compiler')
-rw-r--r--src/qml/compiler/qv4ssa.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/qml/compiler/qv4ssa.cpp b/src/qml/compiler/qv4ssa.cpp
index b3eb6835df..eccdfff623 100644
--- a/src/qml/compiler/qv4ssa.cpp
+++ b/src/qml/compiler/qv4ssa.cpp
@@ -2330,7 +2330,7 @@ void splitCriticalEdges(Function *f)
// (see for example section 4 (Lifetime Analysis) of [Wimmer1]). This algorithm makes sure that the
// blocks of a group are scheduled together, with no non-loop blocks in between. This applies
// recursively for nested loops. It also schedules groups of if-then-else-endif blocks together for
-// the smae reason.
+// the same reason.
class BlockScheduler
{
Function *function;
@@ -2357,15 +2357,15 @@ class BlockScheduler
if (emitted.alreadyProcessed(in))
continue;
- // this is a loop, where there in -> candidate edge is the jump back to the top of the loop.
if (dominatorTree.dominates(candidate, in))
+ // this is a loop, where there in -> candidate edge is the jump back to the top of the loop.
continue;
return false; // an incoming edge that is not yet emitted, and is not a back-edge
}
- // postpone everything, and schedule the loop first.
if (candidate->isGroupStart()) {
+ // postpone everything, and schedule the loop first.
postponedGroups.push(currentGroup);
currentGroup = WorkForGroup(candidate);
}
@@ -2389,6 +2389,7 @@ class BlockScheduler
return next;
}
+ Q_UNREACHABLE();
return 0;
}
@@ -3476,11 +3477,11 @@ void Optimizer::run(QQmlEnginePrivate *qmlEngine)
// block scheduling, so remove those now.
// qout << "Cleaning up unreachable basic blocks..." << endl;
cleanupBasicBlocks(function, false);
- showMeTheCode(function);
+// showMeTheCode(function);
// qout << "Doing block scheduling..." << endl;
startEndLoops = BlockScheduler(function, df).go();
- showMeTheCode(function);
+// showMeTheCode(function);
#ifndef QT_NO_DEBUG
checkCriticalEdges(function->basicBlocks);
@@ -3750,3 +3751,10 @@ MoveMapping::Action MoveMapping::schedule(const Move &m, QList<Move> &todo, QLis
// References:
// [Wimmer1] C. Wimmer and M. Franz. Linear Scan Register Allocation on SSA Form. In Proceedings of
// CGO’10, ACM Press, 2010
+// [Wimmer2] C. Wimmer and H. Mossenbock. Optimized Interval Splitting in a Linear Scan Register
+// Allocator. In Proceedings of the ACM/USENIX International Conference on Virtual
+// Execution Environments, pages 132–141. ACM Press, 2005.
+// [Briggs] P. Briggs, K.D. Cooper, T.J. Harvey, and L.T. Simpson. Practical Improvements to the
+// Construction and Destruction of Static Single Assignment Form.
+// [Appel] A.W. Appel. Modern Compiler Implementation in Java. Second edition, Cambridge
+// University Press.