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

Issue 10735020: Optimize Smi keys for KeyedLoads (Closed)

Created:
8 years, 5 months ago by danno
Modified:
8 years, 5 months ago
Reviewers:
Michael Starzinger
CC:
v8-dev
Visibility:
Public.

Description

Optimize Smi keys for KeyedLoads Allows KeyeLoad/KeyedStore operations where the key is a Smi to fold the untagging of the key into the element offset calculation. Committed: https://code.google.com/p/v8/source/detail?r=12156

Patch Set 1 #

Patch Set 2 : Simplify patch #

Patch Set 3 : More iteration #

Patch Set 4 : Start x64 port #

Patch Set 5 : Finish x64 implementation #

Patch Set 6 : Implement ARM #

Patch Set 7 : Fix bug #

Patch Set 8 : merge with latest #

Total comments: 18

Patch Set 9 : Address review feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+379 lines, -143 lines) Patch
M src/arm/lithium-arm.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M src/arm/lithium-arm.cc View 1 2 3 4 5 6 7 6 chunks +12 lines, -6 lines 0 comments Download
M src/arm/lithium-codegen-arm.h View 1 2 3 4 5 6 7 1 chunk +9 lines, -0 lines 0 comments Download
M src/arm/lithium-codegen-arm.cc View 1 2 3 4 5 6 7 8 11 chunks +79 lines, -35 lines 0 comments Download
M src/hydrogen.cc View 1 2 3 4 5 6 7 8 3 chunks +6 lines, -3 lines 0 comments Download
M src/hydrogen-instructions.h View 1 2 3 4 5 6 7 8 3 chunks +19 lines, -3 lines 0 comments Download
M src/ia32/lithium-codegen-ia32.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M src/ia32/lithium-codegen-ia32.cc View 1 2 3 4 5 6 7 8 8 chunks +35 lines, -10 lines 0 comments Download
M src/ia32/lithium-ia32.h View 1 2 3 4 5 6 7 2 chunks +14 lines, -0 lines 0 comments Download
M src/ia32/lithium-ia32.cc View 1 2 3 4 5 6 7 7 chunks +24 lines, -10 lines 0 comments Download
M src/x64/lithium-codegen-x64.cc View 1 2 3 4 5 6 7 8 11 chunks +89 lines, -59 lines 0 comments Download
M src/x64/lithium-x64.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M src/x64/lithium-x64.cc View 1 2 3 4 5 6 7 7 chunks +38 lines, -17 lines 0 comments Download
M test/mjsunit/external-array.js View 1 2 3 4 1 chunk +51 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Michael Starzinger
LGTM (with nits). https://chromiumcodereview.appspot.com/10735020/diff/21001/src/arm/lithium-codegen-arm.cc File src/arm/lithium-codegen-arm.cc (right): https://chromiumcodereview.appspot.com/10735020/diff/21001/src/arm/lithium-codegen-arm.cc#newcode2786 src/arm/lithium-codegen-arm.cc:2786: __ add(scratch, elements, Operand(key, LSL, kPointerSizeLog2 ...
8 years, 5 months ago (2012-07-19 21:02:23 UTC) #1
danno
Feedback addressed, landing. http://codereview.chromium.org/10735020/diff/21001/src/arm/lithium-codegen-arm.cc File src/arm/lithium-codegen-arm.cc (right): http://codereview.chromium.org/10735020/diff/21001/src/arm/lithium-codegen-arm.cc#newcode2786 src/arm/lithium-codegen-arm.cc:2786: __ add(scratch, elements, Operand(key, LSL, kPointerSizeLog2 ...
8 years, 5 months ago (2012-07-20 09:51:57 UTC) #2
danno
http://codereview.chromium.org/10735020/diff/21001/src/ia32/lithium-codegen-ia32.cc File src/ia32/lithium-codegen-ia32.cc (right): http://codereview.chromium.org/10735020/diff/21001/src/ia32/lithium-codegen-ia32.cc#newcode2706 src/ia32/lithium-codegen-ia32.cc:2706: if (key_representation.IsTagged() && shift_size >= 1) { On 2012/07/19 ...
8 years, 5 months ago (2012-07-20 10:40:27 UTC) #3
Michael Starzinger
8 years, 5 months ago (2012-07-20 10:50:25 UTC) #4
https://chromiumcodereview.appspot.com/10735020/diff/21001/src/ia32/lithium-c...
File src/ia32/lithium-codegen-ia32.cc (right):

https://chromiumcodereview.appspot.com/10735020/diff/21001/src/ia32/lithium-c...
src/ia32/lithium-codegen-ia32.cc:2706: if (key_representation.IsTagged() &&
shift_size >= 1) {
On 2012/07/20 10:40:27, danno wrote:
> On 2012/07/19 21:02:23, Michael Starzinger wrote:
> > Can we also make this condition use !ExternalArrayOpRequiresTemp(...) and
> > instead ASSERT(shift_size >= kSmiTagSize)?
> 
> Actually, it turns out that ExternalArrayOpRequiresTemp test something
> difference, and one is not replaceable by the other, so I'm leaving the code
> as-is.

I see, OK. Just use the kSmiTagSize constant.

Powered by Google App Engine
This is Rietveld 408576698