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

Issue 10031031: Remove write-barriers for stores to new-space objects. (Closed)

Created:
8 years, 8 months ago by Michael Starzinger
Modified:
8 years, 8 months ago
Reviewers:
Erik Corry
CC:
v8-dev
Visibility:
Public.

Description

Remove write-barriers for stores to new-space objects. This change allows hydrogen instructions to keep track of instructions that dominate certain side-effects (GVN flags) in the hydrogen graph. We use the GVN pass to keep track of side-effects because accurate flags are already in place. It also adds a new side-effect (kChangesNewSpacePromotion) indicating whether an instruction can cause a GC and have objects be promoted to old-space. An object allocated in new-space is sure to stay on paths not having said side-effect. R=erik.corry@gmail.com TEST=mjsunit/compiler/inline-construct Committed: https://code.google.com/p/v8/source/detail?r=11270

Patch Set 1 #

Patch Set 2 : Make kNumberOfTrackedSideEffects a generated value. #

Total comments: 10

Patch Set 3 : Addressed comments by Erik Corry. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+151 lines, -21 lines) Patch
M src/hydrogen.h View 1 2 1 chunk +24 lines, -0 lines 0 comments Download
M src/hydrogen.cc View 1 2 7 chunks +70 lines, -12 lines 0 comments Download
M src/hydrogen-instructions.h View 1 2 14 chunks +52 lines, -8 lines 0 comments Download
M src/hydrogen-instructions.cc View 2 chunks +5 lines, -1 line 0 comments Download

Messages

Total messages: 3 (0 generated)
Michael Starzinger
8 years, 8 months ago (2012-04-10 11:23:10 UTC) #1
Erik Corry
LGTM https://chromiumcodereview.appspot.com/10031031/diff/1001/src/hydrogen-instructions.h File src/hydrogen-instructions.h (right): https://chromiumcodereview.appspot.com/10031031/diff/1001/src/hydrogen-instructions.h#newcode523 src/hydrogen-instructions.h:523: #undef COUNT_FLAG I think it would be nice ...
8 years, 8 months ago (2012-04-10 12:06:52 UTC) #2
Michael Starzinger
8 years, 8 months ago (2012-04-11 09:53:08 UTC) #3
Added new patch set.

https://chromiumcodereview.appspot.com/10031031/diff/1001/src/hydrogen-instru...
File src/hydrogen-instructions.h (right):

https://chromiumcodereview.appspot.com/10031031/diff/1001/src/hydrogen-instru...
src/hydrogen-instructions.h:523: #undef COUNT_FLAG
On 2012/04/10 12:06:52, Erik Corry wrote:
> I think it would be nice to provide functions:
> 
> GVNFlag ChangesFlagFromInt(int x) { return x * 2; }
> GVNFlag DependsOnFlagFromInt(int x) { return x * 2 + 1; }
> 
> and then use them instead of just multiplying by 2, which is fairly opaque.

Done.

https://chromiumcodereview.appspot.com/10031031/diff/1001/src/hydrogen-instru...
src/hydrogen-instructions.h:804: result.Remove(kChangesNewSpace);
On 2012/04/10 12:06:52, Erik Corry wrote:
> The name makes it sound like any write to new space is tracked, but actually
it
> is just tracking whether anything might happen to promote objects from new
> space.  Would kChangesNewSpacePromotion be better?

Done.

https://chromiumcodereview.appspot.com/10031031/diff/1001/src/hydrogen-instru...
src/hydrogen-instructions.h:4053: offset_(offset) {
On 2012/04/10 12:06:52, Erik Corry wrote:
> Should you not initialize new_space_dominator_ here?

Done.

https://chromiumcodereview.appspot.com/10031031/diff/1001/src/hydrogen.cc
File src/hydrogen.cc (right):

https://chromiumcodereview.appspot.com/10031031/diff/1001/src/hydrogen.cc#new...
src/hydrogen.cc:1700: HSideEffectMap& dominators) {
On 2012/04/10 12:06:52, Erik Corry wrote:
> This should be a pointer argument:
>
http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Reference_Argu...

Done.

https://chromiumcodereview.appspot.com/10031031/diff/1001/src/hydrogen.cc#new...
src/hydrogen.cc:1741: GVNFlag depends_on_flag = static_cast<GVNFlag>(i * 2 + 1);
On 2012/04/10 12:06:52, Erik Corry wrote:
> This would be cleaner with a variable to hold dominators[i] that you can use
in
> the 4 places below.

Done.

Powered by Google App Engine
This is Rietveld 408576698