Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(344)

Issue 1434213005: VM: Fix imprecision in array bounds check elimination. (Closed)

Created:
5 years, 1 month ago by Florian Schneider
Modified:
5 years, 1 month ago
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

VM: 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -9 lines) Patch
M runtime/vm/compiler.cc View 1 chunk +4 lines, -1 line 0 comments Download
M runtime/vm/flow_graph_range_analysis.cc View 1 chunk +1 line, -8 lines 0 comments Download

Messages

Total messages: 5 (2 generated)
Florian Schneider
5 years, 1 month ago (2015-11-12 13:23:31 UTC) #3
Vyacheslav Egorov (Google)
LGTM
5 years, 1 month ago (2015-11-12 13:28:54 UTC) #4
Florian Schneider
5 years, 1 month ago (2015-11-12 14:18:30 UTC) #5
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
97e48123d843a9b4901312ea58ea80e59f602a5a (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698