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

Issue 13469013: Use range analysis to improve constant propagation. (Closed)

Created:
7 years, 8 months ago by Florian Schneider
Modified:
7 years, 8 months ago
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Use 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+211 lines, -16 lines) Patch
M runtime/vm/compiler.cc View 1 1 chunk +7 lines, -0 lines 0 comments Download
M runtime/vm/flow_graph_optimizer.h View 1 1 chunk +5 lines, -0 lines 0 comments Download
M runtime/vm/flow_graph_optimizer.cc View 1 2 5 chunks +55 lines, -9 lines 0 comments Download
M runtime/vm/intermediate_language.h View 1 6 chunks +27 lines, -3 lines 0 comments Download
M runtime/vm/intermediate_language.cc View 1 2 4 chunks +38 lines, -1 line 0 comments Download
M tests/language/range_analysis_test.dart View 1 2 2 chunks +79 lines, -3 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Florian Schneider
7 years, 8 months ago (2013-04-03 10:49:45 UTC) #1
Vyacheslav Egorov (Google)
LGTM I have to concerns: - it'll be really great to get some good convoluted ...
7 years, 8 months ago (2013-04-03 19:38:57 UTC) #2
Florian Schneider
https://codereview.chromium.org/13469013/diff/5001/runtime/vm/flow_graph_optimizer.cc File runtime/vm/flow_graph_optimizer.cc (right): https://codereview.chromium.org/13469013/diff/5001/runtime/vm/flow_graph_optimizer.cc#newcode2713 runtime/vm/flow_graph_optimizer.cc:2713: // Mark branches that generate unsatisfiable constraints as constant. ...
7 years, 8 months ago (2013-04-04 11:49:15 UTC) #3
Florian Schneider
7 years, 8 months ago (2013-04-04 12:42:27 UTC) #4
Message was sent while issue was closed.
Committed patchset #3 manually as r20914 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698