Chromium Code Reviews

Issue 1030353003: Enable constant pool support. (Closed)

Created:
5 years, 9 months ago by michael_dawson
Modified:
5 years, 7 months ago
Reviewers:
Benedikt Meurer, MTBrandyberry, Sven Panne, danno, rmcilroy
CC:
v8-dev
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Enable constant pool support. Enables constant pool support (distinct from existing OOL feature). The first consumer is PPC. Our measurements show that we get an overall boost of ~3% from this R=danno@chromium.org, svenpanne@chromium.org, bmeurer@chromium.org, rmcilroy@chromium.org, mbrandy@us.ibm.com BUG=

Patch Set 1 #

Total comments: 16
Unified diffs Side-by-side diffs Stats (+1047 lines, -403 lines)
M src/arm/assembler-arm.h View 4 chunks +16 lines, -11 lines 0 comments
M src/arm/assembler-arm-inl.h View 4 chunks +5 lines, -7 lines 0 comments
M src/arm64/assembler-arm64.h View 1 chunk +4 lines, -7 lines 0 comments
M src/arm64/assembler-arm64.cc View 1 chunk +2 lines, -2 lines 0 comments
M src/arm64/assembler-arm64-inl.h View 3 chunks +4 lines, -6 lines 0 comments
M src/assembler.h View 4 chunks +10 lines, -9 lines 0 comments
M src/assembler.cc View 1 chunk +1 line, -1 line 0 comments
M src/compiler/code-generator.cc View 2 chunks +2 lines, -2 lines 2 comments
M src/compiler/code-generator-impl.h View 1 chunk +2 lines, -0 lines 0 comments
M src/compiler/ppc/code-generator-ppc.cc View 2 chunks +13 lines, -2 lines 0 comments
M src/debug.cc View 1 chunk +1 line, -1 line 0 comments
M src/deoptimizer.cc View 10 chunks +10 lines, -10 lines 0 comments
M src/factory.cc View 3 chunks +12 lines, -4 lines 0 comments
M src/flag-definitions.h View 1 chunk +2 lines, -0 lines 0 comments
M src/frames.h View 3 chunks +8 lines, -6 lines 0 comments
M src/frames.cc View 11 chunks +17 lines, -15 lines 2 comments
M src/globals.h View 3 chunks +17 lines, -6 lines 0 comments
M src/heap-snapshot-generator.cc View 1 chunk +5 lines, -3 lines 0 comments
M src/heap/heap.cc View 4 chunks +30 lines, -20 lines 0 comments
M src/heap/objects-visiting-inl.h View 2 chunks +8 lines, -3 lines 0 comments
M src/heap/spaces.h View 2 chunks +4 lines, -4 lines 0 comments
M src/ia32/assembler-ia32.h View 2 chunks +6 lines, -9 lines 0 comments
M src/ia32/assembler-ia32.cc View 1 chunk +2 lines, -2 lines 0 comments
M src/ia32/assembler-ia32-inl.h View 1 chunk +2 lines, -4 lines 0 comments
M src/ic/ic.h View 10 chunks +16 lines, -14 lines 2 comments
M src/ic/ic.cc View 10 chunks +16 lines, -20 lines 0 comments
M src/ic/ic-inl.h View 3 chunks +22 lines, -10 lines 0 comments
M src/ic/ic-state.h View 1 chunk +1 line, -2 lines 0 comments
M src/ic/ic-state.cc View 1 chunk +1 line, -1 line 0 comments
M src/ic/ppc/handler-compiler-ppc.cc View 3 chunks +3 lines, -3 lines 0 comments
M src/lithium.cc View 1 chunk +3 lines, -1 line 0 comments
M src/macro-assembler.h View 3 chunks +14 lines, -12 lines 0 comments
M src/mips/assembler-mips.h View 2 chunks +6 lines, -9 lines 0 comments
M src/mips/assembler-mips.cc View 1 chunk +2 lines, -2 lines 0 comments
M src/mips64/assembler-mips64.h View 2 chunks +6 lines, -9 lines 0 comments
M src/mips64/assembler-mips64.cc View 1 chunk +2 lines, -2 lines 0 comments
M src/objects.h View 4 chunks +20 lines, -4 lines 2 comments
M src/objects.cc View 2 chunks +26 lines, -10 lines 0 comments
M src/objects-inl.h View 4 chunks +18 lines, -3 lines 0 comments
M src/ppc/assembler-ppc.h View 16 chunks +215 lines, -12 lines 0 comments
M src/ppc/assembler-ppc.cc View 10 chunks +164 lines, -7 lines 0 comments
M src/ppc/assembler-ppc-inl.h View 7 chunks +88 lines, -8 lines 2 comments
M src/ppc/builtins-ppc.cc View 15 chunks +22 lines, -13 lines 0 comments
M src/ppc/code-stubs-ppc.cc View 13 chunks +22 lines, -16 lines 0 comments
M src/ppc/debug-ppc.cc View 1 chunk +1 line, -1 line 0 comments
M src/ppc/deoptimizer-ppc.cc View 1 chunk +2 lines, -2 lines 0 comments
M src/ppc/frames-ppc.h View 1 chunk +5 lines, -2 lines 0 comments
M src/ppc/frames-ppc.cc View 1 chunk +4 lines, -4 lines 0 comments
M src/ppc/full-codegen-ppc.cc View 9 chunks +16 lines, -34 lines 0 comments
M src/ppc/lithium-codegen-ppc.cc View 4 chunks +13 lines, -4 lines 0 comments
M src/ppc/macro-assembler-ppc.h View 4 chunks +13 lines, -6 lines 0 comments
M src/ppc/macro-assembler-ppc.cc View 13 chunks +117 lines, -25 lines 6 comments
M src/runtime/runtime-generator.cc View 1 chunk +1 line, -1 line 0 comments
M src/x64/assembler-x64.h View 2 chunks +6 lines, -9 lines 0 comments
M src/x64/assembler-x64.cc View 1 chunk +2 lines, -2 lines 0 comments
M src/x64/assembler-x64-inl.h View 1 chunk +2 lines, -4 lines 0 comments
M src/x87/assembler-x87.h View 2 chunks +6 lines, -9 lines 0 comments
M src/x87/assembler-x87.cc View 1 chunk +2 lines, -2 lines 0 comments
M src/x87/assembler-x87-inl.h View 1 chunk +2 lines, -4 lines 0 comments
M test/cctest/test-compiler.cc View 1 chunk +3 lines, -0 lines 0 comments
M test/cctest/test-reloc-info.cc View 1 chunk +2 lines, -2 lines 0 comments

Messages

Total messages: 10 (0 generated)
michael_dawson
New review for constant pool support, distinct from existing OOL support
5 years, 9 months ago (2015-03-26 15:38:45 UTC) #1
michael_dawson
On 2015/03/26 15:38:45, michael_dawson wrote: > New review for constant pool support, distinct from existing ...
5 years, 8 months ago (2015-04-02 17:11:14 UTC) #2
rmcilroy
Apologies for the delay - we were working out what we want to do with ...
5 years, 8 months ago (2015-04-08 12:38:55 UTC) #3
MTBrandyberry
On 2015/04/08 12:38:55, rmcilroy wrote: > Apologies for the delay - we were working out ...
5 years, 8 months ago (2015-04-16 15:56:39 UTC) #4
rmcilroy
On 2015/04/16 15:56:39, mtbrandyberry wrote: > On 2015/04/08 12:38:55, rmcilroy wrote: > > Apologies for ...
5 years, 8 months ago (2015-04-16 16:06:19 UTC) #5
MTBrandyberry
On 2015/04/16 16:06:19, rmcilroy (OOO till 18th May) wrote: > On 2015/04/16 15:56:39, mtbrandyberry wrote: ...
5 years, 7 months ago (2015-04-30 18:59:48 UTC) #6
rmcilroy
> Update: picking this up again. Should hopefully have something out for review > next ...
5 years, 7 months ago (2015-05-01 09:39:20 UTC) #7
MTBrandyberry
I'm getting close to resubmitting this as discussed. See responses to prior review comments. https://codereview.chromium.org/1030353003/diff/1/src/compiler/code-generator.cc ...
5 years, 7 months ago (2015-05-07 20:38:33 UTC) #8
MTBrandyberry
On 2015/05/07 20:38:33, mtbrandyberry wrote: > I'm getting close to resubmitting this as discussed. See ...
5 years, 7 months ago (2015-05-08 03:50:41 UTC) #9
michael_dawson
5 years, 7 months ago (2015-05-08 14:05:38 UTC) #10
On 2015/05/08 03:50:41, mtbrandyberry wrote:
> On 2015/05/07 20:38:33, mtbrandyberry wrote:
> > I'm getting close to resubmitting this as discussed.  See responses to prior
> > review comments.
> > 
> >
>
https://codereview.chromium.org/1030353003/diff/1/src/compiler/code-generator.cc
> > File src/compiler/code-generator.cc (right):
> > 
> >
>
https://codereview.chromium.org/1030353003/diff/1/src/compiler/code-generator...
> > src/compiler/code-generator.cc:125: FinishCode(masm());
> > On 2015/04/08 12:38:55, rmcilroy (OOO till 18th May) wrote:
> > > Don't move this - instead insert a separate step which emits the embedded
> > > constant pool.
> > 
> > Acknowledged.
> > 
> > https://codereview.chromium.org/1030353003/diff/1/src/frames.cc
> > File src/frames.cc (left):
> > 
> > https://codereview.chromium.org/1030353003/diff/1/src/frames.cc#oldcode326
> > src/frames.cc:326: }
> > On 2015/04/08 12:38:55, rmcilroy (OOO till 18th May) wrote:
> > > I'm not sure why you are making this change here, could you explain?
> > 
> > By definition, the an exit frame's pc_address is above sp (see
> > ExitFrame::FillState).  Thus, this check always fails.
> > 
> > https://codereview.chromium.org/1030353003/diff/1/src/ic/ic.h
> > File src/ic/ic.h (right):
> > 
> > https://codereview.chromium.org/1030353003/diff/1/src/ic/ic.h#newcode291
> > src/ic/ic.h:291: };
> > On 2015/04/08 12:38:55, rmcilroy (OOO till 18th May) wrote:
> > > let's not make this a union. I'm not sure that storing this as a raw
address
> > is
> > > OK - what if a GC happens in the middle of the IC handling and the code
> object
> > > movede, then this address will point to the wrong location.  
> > 
> > This address is the stack slot holding the constant pool pointer -- not the
> > constant pool pointer itself (providing a level of indirection just like
> > pc_address_).  I will make this more clear.
> > 
> > https://codereview.chromium.org/1030353003/diff/1/src/objects.h
> > File src/objects.h (right):
> > 
> > https://codereview.chromium.org/1030353003/diff/1/src/objects.h#newcode5628
> > src/objects.h:5628: static const int kOOLConstantPoolOffset =
kPrologueOffset
> +
> > kIntSize;
> > On 2015/04/08 12:38:55, rmcilroy (OOO till 18th May) wrote:
> > > Let's just have a single field here which points to the embedded constant
> pool
> > > (since we are removing the OOL constant pool support) - this should avoid
> you
> > > having to do the extra tristate things below.
> > 
> > Acknowledged.
> > 
> >
https://codereview.chromium.org/1030353003/diff/1/src/ppc/assembler-ppc-inl.h
> > File src/ppc/assembler-ppc-inl.h (right):
> > 
> >
>
https://codereview.chromium.org/1030353003/diff/1/src/ppc/assembler-ppc-inl.h...
> > src/ppc/assembler-ppc-inl.h:574: Memory::Address_at(pc) = target;
> > On 2015/04/08 12:38:55, rmcilroy (OOO till 18th May) wrote:
> > > What is this branch for? It looks like pc is pointing to the constant pool
> > entry
> > > - we shouldn't be passing this into set_target_address_at.
> > 
> > I was experimenting at one point with associating relocations with the
> constant
> > pool entry itself rather than the instruction loading the entry.  I will
> remove.
> > 
> >
>
https://codereview.chromium.org/1030353003/diff/1/src/ppc/macro-assembler-ppc.cc
> > File src/ppc/macro-assembler-ppc.cc (right):
> > 
> >
>
https://codereview.chromium.org/1030353003/diff/1/src/ppc/macro-assembler-ppc...
> > src/ppc/macro-assembler-ppc.cc:686: } else {
> > On 2015/04/08 12:38:55, rmcilroy (OOO till 18th May) wrote:
> > > I think these should be two separate functions (with and without the base
> > > regisiter)
> > 
> > Acknowledged.
> > 
> >
>
https://codereview.chromium.org/1030353003/diff/1/src/ppc/macro-assembler-ppc...
> > src/ppc/macro-assembler-ppc.cc:700: LoadOwnConstantPoolPointerRegister(ip,
> > -prologue_offset);
> > On 2015/04/08 12:38:55, rmcilroy (OOO till 18th May) wrote:
> > > Where does ip get set to the prologue address?
> > 
> > All calls to JS code are done via the ip register.  Any instructions prior
to
> > the prologue are adjusted for -- see LCodeGen::GeneratePrologue.
> > 
> >
>
https://codereview.chromium.org/1030353003/diff/1/src/ppc/macro-assembler-ppc...
> > src/ppc/macro-assembler-ppc.cc:737: LoadOwnConstantPoolPointerRegister(ip,
> > -prologue_offset);
> > On 2015/04/08 12:38:55, rmcilroy (OOO till 18th May) wrote:
> > > ditto
> > 
> > see above.
> 
> Resubmitted via new issue: https://codereview.chromium.org/1131783003/

closing as there is a new issue to cover

Powered by Google App Engine