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

Issue 660449: Initial implementation of an edge-labeled instruction flow graph. (Closed)

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

Description

Initial implementation of an edge-labeled instruction flow graph. The flow graph is built by walking the AST. Edges are labeled with instructions (AST nodes). Normal nodes have a single predecessor edge and a single (labeled) successor edge. Branch nodes are explicit, they have a single predecessor edge and a pair of (unlabeled) successor edges. Merge nodes are explicit, they have a pair of predecessor edges and a single (unlabeled) successor edge. There is a distinguished (normal) entry node and a distinguished (special) exit node with arbitrarily many predecessor edges and no successor edges. The graph is intended to support graph-based analysis and transformation. Committed: http://code.google.com/p/v8/source/detail?r=4051

Patch Set 1 #

Patch Set 2 : Change to node-labeled basic block flow graph. #

Patch Set 3 : Remove unused depth-first search function. #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+1232 lines, -13 lines) Patch
M src/ast.h View 5 chunks +10 lines, -9 lines 0 comments Download
M src/compiler.cc View 1 3 chunks +23 lines, -0 lines 0 comments Download
M src/data-flow.h View 1 2 1 chunk +293 lines, -0 lines 3 comments Download
M src/data-flow.cc View 1 2 4 chunks +899 lines, -0 lines 1 comment Download
M src/flag-definitions.h View 2 chunks +3 lines, -0 lines 0 comments Download
M src/prettyprinter.cc View 4 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Kevin Millikin (Chromium)
Includes partial work-in-progress support for simple printing.
10 years, 9 months ago (2010-03-03 12:51:09 UTC) #1
Kevin Millikin (Chromium)
Please take a look.
10 years, 9 months ago (2010-03-05 13:43:08 UTC) #2
fschneider
10 years, 9 months ago (2010-03-08 12:14:26 UTC) #3
LGTM.

http://codereview.chromium.org/660449/diff/3007/3010
File src/data-flow.cc (right):

http://codereview.chromium.org/660449/diff/3007/3010#newcode736
src/data-flow.cc:736: prop->obj()->set_num(AstNode::kNoNumber);
We should remove depending on certain nodes having no number as a separate
change.

http://codereview.chromium.org/660449/diff/3007/3011
File src/data-flow.h (right):

http://codereview.chromium.org/660449/diff/3007/3011#newcode116
src/data-flow.h:116: void Append(AstNode* instruction);
I'm not sure if overloading the name Append helps readability. I'd prefer using
AppendInstruction, AppendNode, AppendFlowGraph.

http://codereview.chromium.org/660449/diff/3007/3011#newcode125
src/data-flow.h:125: // and merged, so the graph remains single-entry,
single-exit.
Maybe mentions that left is always the true-branch and right is the false
branch.

http://codereview.chromium.org/660449/diff/3007/3011#newcode165
src/data-flow.h:165: void MarkWith(bool mark) { mark_ = mark; }
Name this functions consistently with other accessors mark() and set_mark()

Powered by Google App Engine
This is Rietveld 408576698