Chromium Code Reviews
DescriptionUse range analysis to improve constant propagation.
This CL runs a second round of constant propagation after range
analysis to eliminate additional unreachable code. Range analysis
is changed to mark branches as constant if the constraints they
generate are unsatisfiable.
The second pass of constant propagation only visits branches and
removes unreachable code, but does not do full constant propagation.
This proves useful when inlining array view operations where the
following pattern occurs:
for (i = 0; i < length; i++) {
if (i < 0 || i >= length) {
throw 123;
}
foo();
}
In this example the if-statement will be eliminated completely.
Also, fix a bug in range analyis where constraints of already
constrained values were missing.
Committed: https://code.google.com/p/dart/source/detail?r=20914
Patch Set 1 #Patch Set 2 : #
Total comments: 2
Patch Set 3 : addressed comments #
Messages
Total messages: 4 (0 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||