Chromium Code Reviews
DescriptionSecond step for computing SSA: renaming.
This CL adds the renaming step to the SSA construction. The renaming pass
initializes a start environment with the initial values of all locals (#null)
and parameters and removes LoadLocal and StoreLocal instructions from the
graph.
Right now the renaming does not support functions with parameters yet.
I added a TODO for this. The SSA form for a simple function with an if-statement:
function foo() {
var v = 0;
var x;
if (v == 0) {
x = 42;
}
return x;
}
looks as follows:
0: [graph]
#null
#null
1: [target]
t0 <- #0
t1 <- #null
t2 <- #0
t3 <- EqualityCompare(t0 == t2)
Branch if t3 goto (2, 3)
2: [target]
t5 <- #42 goto 4
3: [target] goto 4
4: [join]
t4 <- phi(t1,t5)
Return t4
Committed: https://code.google.com/p/dart/source/detail?r=8839
Patch Set 1 #
Total comments: 24
Patch Set 2 : #
Messages
Total messages: 3 (0 generated)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||