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

Issue 704713003: [turbofan] Optimize add operations to use 'leal' instruction on x64 (Closed)

Created:
6 years, 1 month ago by danno
Modified:
6 years, 1 month ago
CC:
v8-dev, Michael Starzinger
Project:
v8
Visibility:
Public.

Description

[turbofan] Optimize add operations to use 'leal' instruction on x64 Add MemoryOperandMatcher that recognizes node clusters in the form [%r1 + %r2*SCALE + OFFSET] and explicit support in the x64 Int32Add selector to use it to translate complex adds to 'leal' instructions. R=titzer@chromium.org Committed: https://code.google.com/p/v8/source/detail?r=25223

Patch Set 1 #

Patch Set 2 : Fix style stuff #

Patch Set 3 : Add unit tests #

Patch Set 4 : Add comments #

Patch Set 5 : Fix formatting #

Patch Set 6 : Rename #

Patch Set 7 : Tweaks #

Total comments: 9

Patch Set 8 : Feedback #

Patch Set 9 : Tweaks #

Total comments: 6

Patch Set 10 : Review feedback #

Patch Set 11 : Tests! #

Patch Set 12 : Test tweaks #

Total comments: 4

Patch Set 13 : Final version #

Unified diffs Side-by-side diffs Delta from patch set Stats (+948 lines, -11 lines) Patch
M src/compiler/node-matchers.h View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +194 lines, -4 lines 0 comments Download
M src/compiler/x64/instruction-selector-x64.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +71 lines, -0 lines 0 comments Download
M test/mjsunit/compiler/division-by-constant.js View 1 2 3 4 5 6 7 8 9 10 2 chunks +6 lines, -3 lines 0 comments Download
A test/unittests/compiler/node-matchers-unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +317 lines, -0 lines 0 comments Download
M test/unittests/compiler/x64/instruction-selector-x64-unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +359 lines, -3 lines 0 comments Download
M test/unittests/unittests.gyp View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 12 (3 generated)
danno
PTAL. It's about +3.5% on Octane zlib
6 years, 1 month ago (2014-11-05 12:32:48 UTC) #2
titzer
https://codereview.chromium.org/704713003/diff/120001/src/compiler/x64/instruction-selector-x64.cc File src/compiler/x64/instruction-selector-x64.cc (right): https://codereview.chromium.org/704713003/diff/120001/src/compiler/x64/instruction-selector-x64.cc#newcode370 src/compiler/x64/instruction-selector-x64.cc:370: : public ValueMatcher<int32_t, IrOpcode::kInt32Add> { What do you inherit ...
6 years, 1 month ago (2014-11-05 13:16:09 UTC) #3
danno
Not ready to land, but is this more like you envisioned it? I'll wait for ...
6 years, 1 month ago (2014-11-06 10:53:03 UTC) #4
titzer
Yeah I like the stateless matcher much better. https://codereview.chromium.org/704713003/diff/160001/src/compiler/node-matchers.h File src/compiler/node-matchers.h (right): https://codereview.chromium.org/704713003/diff/160001/src/compiler/node-matchers.h#newcode184 src/compiler/node-matchers.h:184: bool ...
6 years, 1 month ago (2014-11-06 11:47:06 UTC) #5
danno
PTAL, now with feedback addressed and lots of tests https://codereview.chromium.org/704713003/diff/160001/src/compiler/node-matchers.h File src/compiler/node-matchers.h (right): https://codereview.chromium.org/704713003/diff/160001/src/compiler/node-matchers.h#newcode184 src/compiler/node-matchers.h:184: ...
6 years, 1 month ago (2014-11-06 23:34:07 UTC) #6
dcarney
https://codereview.chromium.org/704713003/diff/220001/src/compiler/x64/instruction-selector-x64.cc File src/compiler/x64/instruction-selector-x64.cc (right): https://codereview.chromium.org/704713003/diff/220001/src/compiler/x64/instruction-selector-x64.cc#newcode382 src/compiler/x64/instruction-selector-x64.cc:382: static const AddressingMode kMRnI_modes[] = {kMode_MR1I, kMode_MR2I, for all ...
6 years, 1 month ago (2014-11-07 09:11:43 UTC) #8
titzer
lgtm https://codereview.chromium.org/704713003/diff/220001/src/compiler/x64/instruction-selector-x64.cc File src/compiler/x64/instruction-selector-x64.cc (right): https://codereview.chromium.org/704713003/diff/220001/src/compiler/x64/instruction-selector-x64.cc#newcode370 src/compiler/x64/instruction-selector-x64.cc:370: int scale_factor, Node* offset, Let's call it scale_exponent ...
6 years, 1 month ago (2014-11-07 16:17:38 UTC) #9
danno
Feedback addressed, landing https://codereview.chromium.org/704713003/diff/220001/src/compiler/x64/instruction-selector-x64.cc File src/compiler/x64/instruction-selector-x64.cc (right): https://codereview.chromium.org/704713003/diff/220001/src/compiler/x64/instruction-selector-x64.cc#newcode370 src/compiler/x64/instruction-selector-x64.cc:370: int scale_factor, Node* offset, On 2014/11/07 ...
6 years, 1 month ago (2014-11-07 16:43:32 UTC) #10
danno
6 years, 1 month ago (2014-11-07 16:47:35 UTC) #11
Message was sent while issue was closed.
Committed patchset #13 (id:240001) manually as 25223 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698