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

Issue 876001: Initialize reaching definitions state for all flow graph nodes. (Closed)

Created:
10 years, 9 months ago by Kevin Millikin (Chromium)
Modified:
9 years, 7 months ago
Reviewers:
fschneider
CC:
v8-dev
Visibility:
Public.

Description

Initialize reaching definitions state for all flow graph nodes. Reaching definitions in (RD_in) is initially empty for all nodes. Gen and kill sets are computed. AST node numbers are used for nodes to refer to their definition number. Also: two small changes to flow graph printing. Children of branch nodes are visited in right-to-left order when performing depth first search. Instructions are numbered locally within blocks so as to not destroy AST node number before printing (it's useful to print the definition). Committed: http://code.google.com/p/v8/source/detail?r=4107

Patch Set 1 #

Total comments: 6

Patch Set 2 : Incorporated review comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+266 lines, -24 lines) Patch
M src/ast.h View 3 chunks +10 lines, -0 lines 0 comments Download
M src/compiler.cc View 2 chunks +18 lines, -0 lines 0 comments Download
M src/data-flow.h View 1 7 chunks +77 lines, -5 lines 0 comments Download
M src/data-flow.cc View 1 14 chunks +161 lines, -19 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Kevin Millikin (Chromium)
10 years, 9 months ago (2010-03-11 12:36:10 UTC) #1
fschneider
LGTM. http://codereview.chromium.org/876001/diff/1/4 File src/data-flow.cc (right): http://codereview.chromium.org/876001/diff/1/4#newcode1970 src/data-flow.cc:1970: PrintF("Def[%s] = {%d", *name, j); I think you ...
10 years, 9 months ago (2010-03-11 15:58:15 UTC) #2
Kevin Millikin (Chromium)
10 years, 9 months ago (2010-03-11 16:20:46 UTC) #3
http://codereview.chromium.org/876001/diff/1/4
File src/data-flow.cc (right):

http://codereview.chromium.org/876001/diff/1/4#newcode1970
src/data-flow.cc:1970: PrintF("Def[%s] = {%d", *name, j);
On 2010/03/11 15:58:15, fschneider wrote:
> I think you could just write 
> 
> PrintF("Def[%s] = {%d", *var->name()->ToCString(), j);
> 
> here.

OK.

http://codereview.chromium.org/876001/diff/1/5
File src/data-flow.h (right):

http://codereview.chromium.org/876001/diff/1/5#newcode134
src/data-flow.h:134: ReachingDefinitionsData() : definitions_(NULL) {}
On 2010/03/11 15:58:15, fschneider wrote:
> I'd initialize killed_ and generated also to NULL here.

Thanks.

http://codereview.chromium.org/876001/diff/1/5#newcode137
src/data-flow.h:137: BitVector* killed_;
On 2010/03/11 15:58:15, fschneider wrote:
> It's just a naming issue, but we could shorten these to kill_ and gen_ since
you
> refer to them as GEN and KILL in the comments as well.

OK.

Powered by Google App Engine
This is Rietveld 408576698