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

Issue 328503003: Extend Range analysis to 64-bit range and mint operations (Closed)

Created:
6 years, 6 months ago by Cutch
Modified:
6 years, 6 months ago
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Extend Range analysis to 64-bit range and mint operations - Convert many private static functions into public static methods on Range or RangeBoundary classes. - Simplify ConstraintInstr::InferRange to just use RangeBoundary::Min and RangeBoundary::Max calls. - Extend RangeBoundary to 64-bits. - Include mints in RangeAnalysis. - Introduce generic Range::BinaryOp. - Require ranges passed to Range::BinaryOp are finite. - Clamp ranges attached to BinarySmiOpInstr and BinaryMintOpInstr. - InferRange for BinaryMintOp and UnboxInteger instructions. - Correctly set mint constant ranges. - Add many tests. R=fschneider@google.com, vegorov@google.com Committed: https://code.google.com/p/dart/source/detail?r=37521

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 23

Patch Set 4 : #

Total comments: 8

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : #

Patch Set 8 : #

Patch Set 9 : #

Patch Set 10 : #

Patch Set 11 : #

Total comments: 12

Patch Set 12 : #

Total comments: 4

Patch Set 13 : #

Total comments: 22

Patch Set 14 : #

Patch Set 15 : #

Patch Set 16 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1364 lines, -410 lines) Patch
M runtime/platform/utils.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +11 lines, -0 lines 0 comments Download
M runtime/vm/compiler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/flow_graph_optimizer.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/flow_graph_optimizer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 15 chunks +53 lines, -26 lines 0 comments Download
M runtime/vm/il_printer.cc View 1 2 3 4 5 6 7 3 chunks +3 lines, -3 lines 0 comments Download
M runtime/vm/intermediate_language.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 10 chunks +216 lines, -74 lines 0 comments Download
M runtime/vm/intermediate_language.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 20 chunks +598 lines, -299 lines 0 comments Download
M runtime/vm/intermediate_language_test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +481 lines, -6 lines 0 comments Download

Messages

Total messages: 21 (0 generated)
Cutch
PTAL.
6 years, 6 months ago (2014-06-10 16:37:51 UTC) #1
Florian Schneider
https://codereview.chromium.org/328503003/diff/40001/runtime/vm/intermediate_language.cc File runtime/vm/intermediate_language.cc (right): https://codereview.chromium.org/328503003/diff/40001/runtime/vm/intermediate_language.cc#newcode2664 runtime/vm/intermediate_language.cc:2664: intptr_t RangeBoundary::Value() const { maybe add ASSERT(kind_ == kConstant); ...
6 years, 6 months ago (2014-06-11 10:41:01 UTC) #2
Vyacheslav Egorov (Google)
https://codereview.chromium.org/328503003/diff/40001/runtime/vm/intermediate_language.cc File runtime/vm/intermediate_language.cc (right): https://codereview.chromium.org/328503003/diff/40001/runtime/vm/intermediate_language.cc#newcode2466 runtime/vm/intermediate_language.cc:2466: RangeBoundary RangeBoundary::LowerBound() const { I don't think having PositiveInfinity.LowerBound() ...
6 years, 6 months ago (2014-06-11 17:36:37 UTC) #3
Vyacheslav Egorov (Google)
more comments https://codereview.chromium.org/328503003/diff/40001/runtime/vm/intermediate_language.cc File runtime/vm/intermediate_language.cc (right): https://codereview.chromium.org/328503003/diff/40001/runtime/vm/intermediate_language.cc#newcode2700 runtime/vm/intermediate_language.cc:2700: if (Range::IsSmiMinimumOrUnderflow(value_range) && I wonder if this ...
6 years, 6 months ago (2014-06-11 20:06:37 UTC) #4
Cutch
Addressed both of your comments. PTAL. https://codereview.chromium.org/328503003/diff/40001/runtime/vm/intermediate_language.cc File runtime/vm/intermediate_language.cc (right): https://codereview.chromium.org/328503003/diff/40001/runtime/vm/intermediate_language.cc#newcode2664 runtime/vm/intermediate_language.cc:2664: intptr_t RangeBoundary::Value() const ...
6 years, 6 months ago (2014-06-13 04:24:26 UTC) #5
Cutch
BTW, I noticed that in ConstraintInstr::InferRange when computing the canonicalized min value we don't break ...
6 years, 6 months ago (2014-06-13 04:27:59 UTC) #6
Vyacheslav Egorov (Google)
https://codereview.chromium.org/328503003/diff/60001/runtime/vm/intermediate_language.cc File runtime/vm/intermediate_language.cc (right): https://codereview.chromium.org/328503003/diff/60001/runtime/vm/intermediate_language.cc#newcode2533 runtime/vm/intermediate_language.cc:2533: const intptr_t offset = b.offset() + a.ConstantValue(); return SymbolicAdd(b, ...
6 years, 6 months ago (2014-06-13 11:50:21 UTC) #7
Cutch
PTAL https://codereview.chromium.org/328503003/diff/60001/runtime/vm/intermediate_language.cc File runtime/vm/intermediate_language.cc (right): https://codereview.chromium.org/328503003/diff/60001/runtime/vm/intermediate_language.cc#newcode2533 runtime/vm/intermediate_language.cc:2533: const intptr_t offset = b.offset() + a.ConstantValue(); On ...
6 years, 6 months ago (2014-06-13 22:45:22 UTC) #8
Cutch
I've extended this CL to include mint range analysis.
6 years, 6 months ago (2014-06-15 23:06:52 UTC) #9
Florian Schneider
https://codereview.chromium.org/328503003/diff/200001/runtime/vm/intermediate_language_test.cc File runtime/vm/intermediate_language_test.cc (right): https://codereview.chromium.org/328503003/diff/200001/runtime/vm/intermediate_language_test.cc#newcode272 runtime/vm/intermediate_language_test.cc:272: EXPECT(range_b->min().IsNegativeInfinity()); Where does it make sense to have +/- ...
6 years, 6 months ago (2014-06-17 10:50:11 UTC) #10
Cutch
https://codereview.chromium.org/328503003/diff/200001/runtime/vm/intermediate_language_test.cc File runtime/vm/intermediate_language_test.cc (right): https://codereview.chromium.org/328503003/diff/200001/runtime/vm/intermediate_language_test.cc#newcode272 runtime/vm/intermediate_language_test.cc:272: EXPECT(range_b->min().IsNegativeInfinity()); On 2014/06/17 10:50:11, Florian Schneider wrote: > Where ...
6 years, 6 months ago (2014-06-17 21:49:04 UTC) #11
Florian Schneider
Lgtm. https://codereview.chromium.org/328503003/diff/220001/runtime/vm/intermediate_language.cc File runtime/vm/intermediate_language.cc (right): https://codereview.chromium.org/328503003/diff/220001/runtime/vm/intermediate_language.cc#newcode2487 runtime/vm/intermediate_language.cc:2487: return overflow; Can this case ever occur? https://codereview.chromium.org/328503003/diff/220001/runtime/vm/intermediate_language.cc#newcode2506 ...
6 years, 6 months ago (2014-06-18 10:14:10 UTC) #12
Vyacheslav Egorov (Google)
not lgtm in C++ signed values overflow is an *undefined behavior* so optimizer is free ...
6 years, 6 months ago (2014-06-18 11:21:59 UTC) #13
Cutch
On 2014/06/18 11:21:59, Vyacheslav Egorov (Google) wrote: > not lgtm > > in C++ signed ...
6 years, 6 months ago (2014-06-18 22:16:27 UTC) #14
Cutch
https://codereview.chromium.org/328503003/diff/220001/runtime/vm/intermediate_language.cc File runtime/vm/intermediate_language.cc (right): https://codereview.chromium.org/328503003/diff/220001/runtime/vm/intermediate_language.cc#newcode2487 runtime/vm/intermediate_language.cc:2487: return overflow; On 2014/06/18 10:14:10, Florian Schneider wrote: > ...
6 years, 6 months ago (2014-06-18 22:16:52 UTC) #15
Vyacheslav Egorov (Google)
lgtm https://codereview.chromium.org/328503003/diff/240001/runtime/vm/flow_graph_optimizer.cc File runtime/vm/flow_graph_optimizer.cc (right): https://codereview.chromium.org/328503003/diff/240001/runtime/vm/flow_graph_optimizer.cc#newcode5106 runtime/vm/flow_graph_optimizer.cc:5106: // Initialize bitvector for quick filtering of smi ...
6 years, 6 months ago (2014-06-19 17:27:31 UTC) #16
Cutch
https://codereview.chromium.org/328503003/diff/240001/runtime/vm/flow_graph_optimizer.cc File runtime/vm/flow_graph_optimizer.cc (right): https://codereview.chromium.org/328503003/diff/240001/runtime/vm/flow_graph_optimizer.cc#newcode5106 runtime/vm/flow_graph_optimizer.cc:5106: // Initialize bitvector for quick filtering of smi values. ...
6 years, 6 months ago (2014-06-19 18:39:36 UTC) #17
Vyacheslav Egorov (Google)
https://codereview.chromium.org/328503003/diff/240001/runtime/vm/intermediate_language.cc File runtime/vm/intermediate_language.cc (right): https://codereview.chromium.org/328503003/diff/240001/runtime/vm/intermediate_language.cc#newcode2899 runtime/vm/intermediate_language.cc:2899: RangeBoundary::kRangeBoundarySmi); On 2014/06/19 18:39:35, Cutch wrote: > On 2014/06/19 ...
6 years, 6 months ago (2014-06-19 18:42:29 UTC) #18
Vyacheslav Egorov (Google)
s/see reaching type/set reaching type/
6 years, 6 months ago (2014-06-19 18:42:53 UTC) #19
Cutch
https://codereview.chromium.org/328503003/diff/240001/runtime/vm/intermediate_language.cc File runtime/vm/intermediate_language.cc (right): https://codereview.chromium.org/328503003/diff/240001/runtime/vm/intermediate_language.cc#newcode2899 runtime/vm/intermediate_language.cc:2899: RangeBoundary::kRangeBoundarySmi); On 2014/06/19 18:42:29, Vyacheslav Egorov (Google) wrote: > ...
6 years, 6 months ago (2014-06-19 20:21:50 UTC) #20
Cutch
6 years, 6 months ago (2014-06-19 21:13:34 UTC) #21
Message was sent while issue was closed.
Committed patchset #16 manually as r37521 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698