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

Issue 7350021: Crankshaft support for FixedDoubleArrays (Closed)

Created:
9 years, 5 months ago by danno
Modified:
9 years, 5 months ago
CC:
v8-dev, Jakob Kummerow
Visibility:
Public.

Description

Crankshaft support for FixedDoubleArrays BUG=none TEST=unboxed-double-arrays.js Committed: http://code.google.com/p/v8/source/detail?r=8682

Patch Set 1 #

Patch Set 2 : Implement ia32 fully #

Patch Set 3 : implement ARM #

Patch Set 4 : fixed names #

Patch Set 5 : deactivate #

Patch Set 6 : use elements #

Patch Set 7 : fix upload hiccup #

Patch Set 8 : fix names #

Patch Set 9 : fix ia32 build #

Total comments: 33

Patch Set 10 : review feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+775 lines, -166 lines) Patch
M src/arm/lithium-arm.h View 1 2 4 chunks +40 lines, -0 lines 0 comments Download
M src/arm/lithium-arm.cc View 1 2 3 4 5 6 7 8 9 3 chunks +35 lines, -0 lines 0 comments Download
M src/arm/lithium-codegen-arm.cc View 1 2 3 4 5 6 7 8 9 4 chunks +89 lines, -4 lines 0 comments Download
M src/hydrogen.cc View 1 2 3 4 5 6 7 8 9 7 chunks +58 lines, -20 lines 0 comments Download
M src/hydrogen-instructions.h View 1 2 3 4 5 6 7 8 9 4 chunks +68 lines, -0 lines 0 comments Download
M src/hydrogen-instructions.cc View 1 2 3 2 chunks +22 lines, -0 lines 0 comments Download
M src/ia32/lithium-codegen-ia32.h View 1 chunk +4 lines, -3 lines 0 comments Download
M src/ia32/lithium-codegen-ia32.cc View 1 2 3 4 5 6 7 8 9 5 chunks +55 lines, -8 lines 0 comments Download
M src/ia32/lithium-ia32.h View 1 2 3 4 5 4 chunks +41 lines, -0 lines 0 comments Download
M src/ia32/lithium-ia32.cc View 1 2 3 4 5 6 7 8 3 chunks +35 lines, -0 lines 0 comments Download
M src/x64/lithium-codegen-x64.h View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M src/x64/lithium-codegen-x64.cc View 1 2 3 4 5 6 7 8 9 5 chunks +57 lines, -8 lines 0 comments Download
M src/x64/lithium-x64.h View 1 2 3 4 5 4 chunks +40 lines, -0 lines 0 comments Download
M src/x64/lithium-x64.cc View 1 2 3 4 5 6 7 3 chunks +35 lines, -0 lines 0 comments Download
M test/mjsunit/unbox-double-arrays.js View 1 2 3 4 5 6 7 8 9 4 chunks +193 lines, -121 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
danno
please review.
9 years, 5 months ago (2011-07-18 14:29:40 UTC) #1
Alexandre
Three possible minor possible optimizations on ARM. Alexandre http://codereview.chromium.org/7350021/diff/16001/src/arm/lithium-codegen-arm.cc File src/arm/lithium-codegen-arm.cc (right): http://codereview.chromium.org/7350021/diff/16001/src/arm/lithium-codegen-arm.cc#newcode2458 src/arm/lithium-codegen-arm.cc:2458: __ ...
9 years, 5 months ago (2011-07-18 16:22:14 UTC) #2
Mads Ager (chromium)
LGTM with a number of nits. The nits for ia32 applies to x64 as well ...
9 years, 5 months ago (2011-07-19 08:03:51 UTC) #3
danno
9 years, 5 months ago (2011-07-19 12:50:16 UTC) #4
addressed feedback, landing...

http://codereview.chromium.org/7350021/diff/16001/src/arm/lithium-codegen-arm.cc
File src/arm/lithium-codegen-arm.cc (right):

http://codereview.chromium.org/7350021/diff/16001/src/arm/lithium-codegen-arm...
src/arm/lithium-codegen-arm.cc:2442: Register scratch1 = scratch0();
On 2011/07/19 08:03:51, Mads Ager wrote:
> scratch1 -> scratch?

Done.

http://codereview.chromium.org/7350021/diff/16001/src/arm/lithium-codegen-arm...
src/arm/lithium-codegen-arm.cc:2456: Operand operand(key_is_constant ?
Operand(constant_key * (1 << shift_size))
On 2011/07/19 08:03:51, Mads Ager wrote:
> Use "operand = expression" instead of "operand(expression)" here?

Done.

http://codereview.chromium.org/7350021/diff/16001/src/arm/lithium-codegen-arm...
src/arm/lithium-codegen-arm.cc:2458: __ add(elements, elements, operand);
On 2011/07/18 16:22:14, Alexandre wrote:
> If key is constant this add instruction can be merged with the one below.

Done.

http://codereview.chromium.org/7350021/diff/16001/src/arm/lithium-codegen-arm...
src/arm/lithium-codegen-arm.cc:2469: Operand(FixedDoubleArray::kHeaderSize -
kSmiTagMask));
On 2011/07/19 08:03:51, Mads Ager wrote:
> kSmiTagMask -> kHeapObjectTag?

Done.

http://codereview.chromium.org/7350021/diff/16001/src/arm/lithium-codegen-arm...
src/arm/lithium-codegen-arm.cc:3304: Operand operand(key_is_constant ?
Operand(constant_key * (1 << shift_size))
On 2011/07/19 08:03:51, Mads Ager wrote:
> I would use '=' here.

Done.

http://codereview.chromium.org/7350021/diff/16001/src/arm/lithium-codegen-arm...
src/arm/lithium-codegen-arm.cc:3306: __ add(elements, elements, operand);
On 2011/07/18 16:22:14, Alexandre wrote:
> If the key is constant, these two add instructions can be merged into one.

Done.

http://codereview.chromium.org/7350021/diff/16001/src/arm/lithium-codegen-arm...
src/arm/lithium-codegen-arm.cc:3306: __ add(elements, elements, operand);
On 2011/07/19 08:03:51, Mads Ager wrote:
> Instead of writing to elements here, can you use the scratch register? That
way
> i think you can avoid writing to elements and you can get away with using
> UseRegisterAtStart instead of UseTempRegister?

Done.

http://codereview.chromium.org/7350021/diff/16001/src/arm/lithium-codegen-arm...
src/arm/lithium-codegen-arm.cc:3308: Operand(FixedDoubleArray::kHeaderSize -
kSmiTagMask));
On 2011/07/19 08:03:51, Mads Ager wrote:
> kHeapObjectTag

Done.

http://codereview.chromium.org/7350021/diff/16001/src/arm/lithium-codegen-arm...
src/arm/lithium-codegen-arm.cc:3314: __ Vmov(value,
FixedDoubleArray::canonical_not_the_hole_nan_as_double());
On 2011/07/18 16:22:14, Alexandre wrote:
> You can spare the previous branch by making this vmov conditional.

Done.

http://codereview.chromium.org/7350021/diff/16001/src/hydrogen-instructions.h
File src/hydrogen-instructions.h (right):

http://codereview.chromium.org/7350021/diff/16001/src/hydrogen-instructions.h...
src/hydrogen-instructions.h:3754: ? Representation::Tagged()
On 2011/07/19 08:03:51, Mads Ager wrote:
> I would avoid the nested ?: here.

Done.

http://codereview.chromium.org/7350021/diff/16001/src/ia32/lithium-codegen-ia...
File src/ia32/lithium-codegen-ia32.cc (right):

http://codereview.chromium.org/7350021/diff/16001/src/ia32/lithium-codegen-ia...
src/ia32/lithium-codegen-ia32.cc:2236: XMMRegister
result(ToDoubleRegister(instr->result()));
On 2011/07/19 08:03:51, Mads Ager wrote:
> I would use = as for elements.

Done.

http://codereview.chromium.org/7350021/diff/16001/src/ia32/lithium-codegen-ia...
src/ia32/lithium-codegen-ia32.cc:2239: Operand
hole_check_operand(BuildFastArrayOperand(
On 2011/07/19 08:03:51, Mads Ager wrote:
> For these operand creations I would use = instead of constructor syntax. Here
> and multiple places below.

Done.

http://codereview.chromium.org/7350021/diff/16001/src/ia32/lithium-codegen-ia...
src/ia32/lithium-codegen-ia32.cc:2241: FixedDoubleArray::kHeaderSize -
kSmiTagMask + sizeof(kHoleNanLower32)));
On 2011/07/19 08:03:51, Mads Ager wrote:
> kHeapObjectTag instead of kSmiTagMask?

Done.

http://codereview.chromium.org/7350021/diff/16001/src/ia32/lithium-codegen-ia...
src/ia32/lithium-codegen-ia32.cc:3111: FixedDoubleArray::kHeaderSize -
kSmiTagMask));
On 2011/07/19 08:03:51, Mads Ager wrote:
> kHeapObjectTag

Done.

http://codereview.chromium.org/7350021/diff/16001/src/x64/lithium-codegen-x64.cc
File src/x64/lithium-codegen-x64.cc (right):

http://codereview.chromium.org/7350021/diff/16001/src/x64/lithium-codegen-x64...
src/x64/lithium-codegen-x64.cc:3102: Register key = instr->key()->IsRegister() ?
ToRegister(instr->key()) : no_reg;
On 2011/07/19 08:03:51, Mads Ager wrote:
> I don't think you ever use this one?

Done.

http://codereview.chromium.org/7350021/diff/16001/test/mjsunit/unbox-double-a...
File test/mjsunit/unbox-double-arrays.js (right):

http://codereview.chromium.org/7350021/diff/16001/test/mjsunit/unbox-double-a...
test/mjsunit/unbox-double-arrays.js:51: function flush_compiled_code() {
On 2011/07/19 08:03:51, Mads Ager wrote:
> Do you need both flush_compiled_code and multiple copies of the test function?

Done.

Powered by Google App Engine
This is Rietveld 408576698