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

Issue 6716018: X64: Optimize access to external references. (Closed)

Created:
9 years, 9 months ago by Lasse Reichstein
Modified:
9 years, 6 months ago
Reviewers:
William Hesse
CC:
v8-dev
Visibility:
Public.

Description

X64: Optimize access to external references. Access to an ExternalReference in non-serializable code will try to use an offset relative to the root-array register. Since the root-array is in the Heap object, and the Heap object is in the Isolate object, there's a good chance that any external data field is within a 32-bit offset of the root array register. It falls back on the original behavior if the serializer is enabled, if the root register isn't initialized or if the offset is not representable as a 32-bit value. Committed: http://code.google.com/p/v8/source/detail?r=7315

Patch Set 1 #

Total comments: 4

Patch Set 2 : Addressed review comments. #

Patch Set 3 : Merge with tip of bleeding edge. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+318 lines, -173 lines) Patch
M src/x64/code-stubs-x64.cc View 1 2 14 chunks +72 lines, -64 lines 0 comments Download
M src/x64/deoptimizer-x64.cc View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M src/x64/ic-x64.cc View 1 2 3 chunks +3 lines, -3 lines 0 comments Download
M src/x64/lithium-codegen-x64.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M src/x64/macro-assembler-x64.h View 1 2 4 chunks +44 lines, -4 lines 0 comments Download
M src/x64/macro-assembler-x64.cc View 1 2 33 chunks +183 lines, -92 lines 0 comments Download
M src/x64/regexp-macro-assembler-x64.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/x64/regexp-macro-assembler-x64.cc View 1 2 2 chunks +5 lines, -0 lines 0 comments Download
M src/x64/stub-cache-x64.cc View 1 2 4 chunks +7 lines, -8 lines 0 comments Download
M test/cctest/test-macro-assembler-x64.cc View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Lasse Reichstein
9 years, 9 months ago (2011-03-22 11:43:08 UTC) #1
William Hesse
LGTM. Shouldn't you get rid of movq(Register, ExternalReference), and eliminate all uses of it, or ...
9 years, 9 months ago (2011-03-22 14:05:08 UTC) #2
Lasse Reichstein
9 years, 9 months ago (2011-03-22 14:12:21 UTC) #3
I can't get rid of movq(Register, ExternalReference) yet,  since I didn't change
codegen-x64.cc (soon to be dead anyway) and I probably left a few uses in
debug-only code as well.

However, I do think it's a good idea for a future patch.

http://codereview.chromium.org/6716018/diff/1/src/x64/deoptimizer-x64.cc
File src/x64/deoptimizer-x64.cc (left):

http://codereview.chromium.org/6716018/diff/1/src/x64/deoptimizer-x64.cc#oldc...
src/x64/deoptimizer-x64.cc:760: ExternalReference roots_address =
ExternalReference::roots_address();
I don't see how. It's a local variable that isn't used anywhere.
I think it's just a leftover from when InitializeRootRegister was introduced.

http://codereview.chromium.org/6716018/diff/1/src/x64/regexp-macro-assembler-...
File src/x64/regexp-macro-assembler-x64.cc (right):

http://codereview.chromium.org/6716018/diff/1/src/x64/regexp-macro-assembler-...
src/x64/regexp-macro-assembler-x64.cc:67: * kRootRegister) are not initialized
during RegExp code.
Except that they are not free either (since we don't save them and they are
callee-save).
Rewording.

Powered by Google App Engine
This is Rietveld 408576698