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

Issue 113837: Change the register allocator so that it no longer tracks references... (Closed)

Created:
11 years, 7 months ago by Kevin Millikin (Chromium)
Modified:
9 years, 7 months ago
Reviewers:
iposva, William Hesse
CC:
v8-dev
Visibility:
Public.

Description

Change the register allocator so that it no longer tracks references to the platform-specific reserved registers. They are always in use for their intended purpose, cannot appear in the virtual frame, and can be freely used without allocation in the code generator. Committed: http://code.google.com/p/v8/source/detail?r=2061

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+793 lines, -428 lines) Patch
M src/arm/assembler-arm.h View 1 chunk +0 lines, -2 lines 0 comments Download
M src/arm/jump-target-arm.cc View 7 chunks +14 lines, -16 lines 0 comments Download
A src/arm/register-allocator-arm.h View 1 chunk +43 lines, -0 lines 0 comments Download
M src/arm/register-allocator-arm.cc View 1 chunk +2 lines, -47 lines 0 comments Download
A src/arm/register-allocator-arm-inl.h View 1 chunk +103 lines, -0 lines 0 comments Download
M src/arm/virtual-frame-arm.h View 1 12 chunks +35 lines, -27 lines 0 comments Download
M src/arm/virtual-frame-arm.cc View 6 chunks +6 lines, -6 lines 0 comments Download
M src/codegen.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M src/ia32/assembler-ia32.h View 1 chunk +0 lines, -2 lines 0 comments Download
M src/ia32/codegen-ia32.h View 1 chunk +2 lines, -2 lines 0 comments Download
M src/ia32/codegen-ia32.cc View 1 2 12 chunks +71 lines, -45 lines 0 comments Download
M src/ia32/jump-target-ia32.cc View 8 chunks +17 lines, -19 lines 0 comments Download
A src/ia32/register-allocator-ia32.h View 1 chunk +43 lines, -0 lines 0 comments Download
M src/ia32/register-allocator-ia32.cc View 1 chunk +0 lines, -40 lines 0 comments Download
A src/ia32/register-allocator-ia32-inl.h View 1 chunk +82 lines, -0 lines 2 comments Download
M src/ia32/virtual-frame-ia32.h View 1 14 chunks +39 lines, -31 lines 2 comments Download
M src/ia32/virtual-frame-ia32.cc View 1 2 27 chunks +44 lines, -42 lines 0 comments Download
M src/jump-target.cc View 6 chunks +15 lines, -14 lines 0 comments Download
M src/jump-target-inl.h View 1 chunk +1 line, -1 line 0 comments Download
M src/register-allocator.h View 1 5 chunks +72 lines, -50 lines 0 comments Download
M src/register-allocator.cc View 3 chunks +6 lines, -7 lines 0 comments Download
M src/register-allocator-inl.h View 1 chunk +11 lines, -0 lines 0 comments Download
M src/virtual-frame.cc View 15 chunks +28 lines, -29 lines 0 comments Download
M src/x64/assembler-x64.h View 1 chunk +1 line, -2 lines 0 comments Download
M src/x64/assembler-x64.cc View 1 chunk +0 lines, -10 lines 0 comments Download
M src/x64/codegen-x64.h View 1 chunk +3 lines, -3 lines 0 comments Download
A src/x64/register-allocator-x64.h View 1 chunk +45 lines, -0 lines 0 comments Download
A src/x64/register-allocator-x64-inl.h View 1 chunk +69 lines, -0 lines 0 comments Download
M src/x64/virtual-frame-x64.h View 1 14 chunks +39 lines, -31 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Kevin Millikin (Chromium)
11 years, 7 months ago (2009-05-26 12:12:01 UTC) #1
William Hesse
LGTM. http://codereview.chromium.org/113837/diff/104/109 File src/ia32/register-allocator-ia32-inl.h (right): http://codereview.chromium.org/113837/diff/104/109#newcode63 Line 63: } You could map the codes 0,1,2,3, ...
11 years, 7 months ago (2009-05-26 13:33:32 UTC) #2
Kevin Millikin (Chromium)
11 years, 7 months ago (2009-05-27 07:43:07 UTC) #3
http://codereview.chromium.org/113837/diff/104/109
File src/ia32/register-allocator-ia32-inl.h (right):

http://codereview.chromium.org/113837/diff/104/109#newcode63
Line 63: }
On 2009/05/26 13:33:32, William Hesse wrote:
> You could map the codes 0,1,2,3, and 7 to the range 0..4 by
> (i + 1) & 7, and back by (i+7) & 7.  Would this be faster than the lookup
> tables?

I'll give it a try.  It has the side effect of allocating in a different order
(changing our bias toward eax into a bias toward edi).

http://codereview.chromium.org/113837/diff/104/121
File src/ia32/virtual-frame-ia32.h (right):

http://codereview.chromium.org/113837/diff/104/121#newcode152
Line 152: // Sync the range of elements in [begin, end] with memory.
On 2009/05/26 13:33:32, William Hesse wrote:
> I am surprised that there were no uses of this that incorrectly assumed that
> elements[end] didn't get synced.
> Is this true, and was this always just an incorrect comment
> listing the range as not including end?

The comment was incorrect.  At some point we changed it to avoid writing +1, but
now I've introduced more call sites where we have to write -1.

Powered by Google App Engine
This is Rietveld 408576698