Chromium Code Reviews
DescriptionVM: Fix imprecision in array bounds check elimination.
Don't eagerly canonicalize the index boundary before getting
the constant value for comparison. Canonicalization may drop more
precise boundaries defined by already inserted constraints.
This enables eliminating the bounds-check in the following example:
test() {
var a = new Float64List(4);
for (var i = 0; i < 4; ++i) {
a[i] = 1.0;
}
return a;
}
Also, add pass of flow-graph canonicalization after load-optimization.
This enables more opportunities for ABCE in examples like:
o.f = new List(4);
o.f[0] = ...
BUG=
R=vegorov@google.com
Committed: https://github.com/dart-lang/sdk/commit/97e48123d843a9b4901312ea58ea80e59f602a5a
Patch Set 1 #
Messages
Total messages: 5 (2 generated)
|
||||||||||||||||||||||||||||