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

Issue 10382055: Array index computation dehoisting. (Closed)

Created:
8 years, 7 months ago by Massi
Modified:
8 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Array index computation dehoisting. When an array index (in an array access) is a simple "expression + constant", just embed the constant in the array access operation so that the full index expression is (potentially) no longer used and its live range can be much shorter. This is effective in conjunction with array bounds check removal (otherwise the index is anyway used in the check). Committed: https://code.google.com/p/v8/source/detail?r=11596

Patch Set 1 #

Total comments: 28

Patch Set 2 : Fixed weird x64 bug related to 32 bit integer operations used in address computations happening in … #

Patch Set 3 : Settled on 30 bits for offset values. #

Patch Set 4 : Removed counters. #

Patch Set 5 : Simplified expression. #

Total comments: 17

Patch Set 6 : Addressed review comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+371 lines, -106 lines) Patch
M src/arm/lithium-arm.h View 1 6 chunks +7 lines, -2 lines 0 comments Download
M src/arm/lithium-codegen-arm.cc View 1 2 3 4 5 7 chunks +40 lines, -16 lines 0 comments Download
M src/flag-definitions.h View 1 chunk +2 lines, -0 lines 0 comments Download
M src/hydrogen.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/hydrogen.cc View 1 2 3 4 5 4 chunks +88 lines, -3 lines 0 comments Download
M src/hydrogen-instructions.h View 1 2 3 4 5 13 chunks +87 lines, -12 lines 0 comments Download
M src/ia32/lithium-codegen-ia32.h View 1 chunk +2 lines, -1 line 0 comments Download
M src/ia32/lithium-codegen-ia32.cc View 1 2 3 4 8 chunks +41 lines, -31 lines 0 comments Download
M src/ia32/lithium-ia32.h View 1 6 chunks +8 lines, -4 lines 0 comments Download
M src/ia32/lithium-ia32.cc View 1 2 3 4 5 1 chunk +1 line, -2 lines 0 comments Download
M src/v8-counters.h View 1 2 3 1 chunk +0 lines, -2 lines 0 comments Download
M src/x64/lithium-codegen-x64.h View 1 chunk +2 lines, -1 line 0 comments Download
M src/x64/lithium-codegen-x64.cc View 1 2 3 4 5 8 chunks +85 lines, -30 lines 0 comments Download
M src/x64/lithium-x64.h View 1 6 chunks +7 lines, -2 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Massi
This should be reviewable: all tests pass and also more complex code executes correctly.
8 years, 7 months ago (2012-05-08 12:40:40 UTC) #1
Jakob Kummerow
Looks good overall. I have some suggestions for simplification. https://chromiumcodereview.appspot.com/10382055/diff/1/src/flag-definitions.h File src/flag-definitions.h (right): https://chromiumcodereview.appspot.com/10382055/diff/1/src/flag-definitions.h#newcode200 src/flag-definitions.h:200: ...
8 years, 7 months ago (2012-05-08 13:46:26 UTC) #2
fschneider
dbc: https://chromiumcodereview.appspot.com/10382055/diff/1/src/ia32/lithium-codegen-ia32.cc File src/ia32/lithium-codegen-ia32.cc (right): https://chromiumcodereview.appspot.com/10382055/diff/1/src/ia32/lithium-codegen-ia32.cc#newcode2481 src/ia32/lithium-codegen-ia32.cc:2481: (constant_value + additional_index) * (1 << shift_size) You ...
8 years, 7 months ago (2012-05-09 10:32:27 UTC) #3
Massi
Addressed all comments and fixed a *nasty* bug on x64. https://chromiumcodereview.appspot.com/10382055/diff/1/src/flag-definitions.h File src/flag-definitions.h (right): https://chromiumcodereview.appspot.com/10382055/diff/1/src/flag-definitions.h#newcode200 ...
8 years, 7 months ago (2012-05-14 13:48:52 UTC) #4
Jakob Kummerow
LGTM if comments are addressed (they're mostly nits). Personally, I don't think the "uint32_t additional_index() ...
8 years, 7 months ago (2012-05-15 15:53:23 UTC) #5
Massi
8 years, 7 months ago (2012-05-18 13:01:01 UTC) #6
Addressed all comments (just left the accessors in the Lithium insts), should
commit on Monday after rebasing.

Powered by Google App Engine
This is Rietveld 408576698