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

Issue 10960014: Implement range analysis for smi values. (Closed)

Created:
8 years, 3 months ago by Vyacheslav Egorov (Google)
Modified:
8 years, 3 months ago
CC:
reviews_dartlang.org, ngeoffray
Visibility:
Public.

Description

Implement range analysis for smi values. And use it to eliminate overflow checks on + and - operations. Committed: https://code.google.com/p/dart/source/detail?r=12733

Patch Set 1 #

Patch Set 2 : remove cruft #

Patch Set 3 : cleanup #

Patch Set 4 : cleanup #

Total comments: 66

Patch Set 5 : addressed majority of comments #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+1016 lines, -64 lines) Patch
M runtime/vm/compiler.cc View 1 2 3 4 1 chunk +6 lines, -0 lines 1 comment Download
M runtime/vm/flow_graph_optimizer.h View 1 2 3 4 2 chunks +3 lines, -1 line 0 comments Download
M runtime/vm/flow_graph_optimizer.cc View 1 2 3 4 7 chunks +458 lines, -4 lines 2 comments Download
M runtime/vm/il_printer.cc View 1 2 3 4 4 chunks +45 lines, -0 lines 0 comments Download
M runtime/vm/intermediate_language.h View 1 2 3 4 14 chunks +311 lines, -4 lines 1 comment Download
M runtime/vm/intermediate_language.cc View 1 2 3 4 6 chunks +174 lines, -3 lines 2 comments Download
M runtime/vm/intermediate_language_ia32.cc View 1 2 3 4 3 chunks +7 lines, -13 lines 0 comments Download
M runtime/vm/intermediate_language_x64.cc View 1 2 3 4 3 chunks +8 lines, -14 lines 0 comments Download
D tests/language/deopt_hoisted_smi_check.dart View 1 2 3 4 1 chunk +0 lines, -20 lines 0 comments Download
A + tests/language/deopt_hoisted_smi_check_test.dart View 1 2 3 4 1 chunk +4 lines, -5 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Vyacheslav Egorov (Google)
This is ready for review. Please take a look.
8 years, 3 months ago (2012-09-20 19:00:33 UTC) #1
Florian Schneider
LGTM. The approach looks promising. Please also add TODOs where there are pieces missing. (e.g. ...
8 years, 3 months ago (2012-09-21 08:56:44 UTC) #2
Kevin Millikin (Google)
LGTM with comments. https://codereview.chromium.org/10960014/diff/7001/runtime/vm/flow_graph_optimizer.cc File runtime/vm/flow_graph_optimizer.cc (right): https://codereview.chromium.org/10960014/diff/7001/runtime/vm/flow_graph_optimizer.cc#newcode1223 runtime/vm/flow_graph_optimizer.cc:1223: // Iterate over smi values and ...
8 years, 3 months ago (2012-09-21 08:59:33 UTC) #3
Vyacheslav Egorov (Google)
Addressed comments and landed. Thanks for the review. (Still don't do all in one pass ...
8 years, 3 months ago (2012-09-21 20:08:06 UTC) #4
ngeoffray
8 years, 3 months ago (2012-09-24 21:44:15 UTC) #5
DBC

https://codereview.chromium.org/10960014/diff/5009/runtime/vm/compiler.cc
File runtime/vm/compiler.cc (right):

https://codereview.chromium.org/10960014/diff/5009/runtime/vm/compiler.cc#new...
runtime/vm/compiler.cc:210: // making some phis smi.
The first part of the sentence makes you think it's a requirement, but the
second part makes you think it's actually just an optimization.

https://codereview.chromium.org/10960014/diff/5009/runtime/vm/flow_graph_opti...
File runtime/vm/flow_graph_optimizer.cc (right):

https://codereview.chromium.org/10960014/diff/5009/runtime/vm/flow_graph_opti...
runtime/vm/flow_graph_optimizer.cc:1284: // Worklists using during range
propagation.
using -> used

https://codereview.chromium.org/10960014/diff/5009/runtime/vm/flow_graph_opti...
runtime/vm/flow_graph_optimizer.cc:1456: Range* constraint_range,
Weird indentation.

https://codereview.chromium.org/10960014/diff/5009/runtime/vm/intermediate_la...
File runtime/vm/intermediate_language.cc (right):

https://codereview.chromium.org/10960014/diff/5009/runtime/vm/intermediate_la...
runtime/vm/intermediate_language.cc:1957: // If phi's range is growing widen it
in the direction of growth to
growing widen -> growing, widen

https://codereview.chromium.org/10960014/diff/5009/runtime/vm/intermediate_la...
runtime/vm/intermediate_language.cc:1958: // speedup convergence.
What's the check for 'growing' here? At first glance it looks like it is the
(range_ != NULL check), but what about phi instructions that use a loop phi?

https://codereview.chromium.org/10960014/diff/5009/runtime/vm/intermediate_la...
File runtime/vm/intermediate_language.h (right):

https://codereview.chromium.org/10960014/diff/5009/runtime/vm/intermediate_la...
runtime/vm/intermediate_language.h:1222: // Used to determine an interation of a
range analysis after all phi inputs
interation -> iteration

Powered by Google App Engine
This is Rietveld 408576698