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

Issue 9730003: Make the CFG depth-first traversal do more work for us. (Closed)

Created:
8 years, 9 months ago by Kevin Millikin (Google)
Modified:
8 years, 9 months ago
Reviewers:
srdjan
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Make the CFG depth-first traversal do more work for us. Turn the depth-first traversal into a pass to discover the graph's basic block structure. Record basic-block predecessors in the block entry instructions. Also record the last instruction in a block in the block entry instruction (giving constant-time access to the block's successors). Also, record the depth-first spanning tree of the traversal to be used for dominator computation. R=srdjan@google.com BUG= TEST= Committed: https://code.google.com/p/dart/source/detail?r=5655

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+172 lines, -65 lines) Patch
M runtime/vm/flow_graph_builder.cc View 1 chunk +5 lines, -2 lines 1 comment Download
M runtime/vm/intermediate_language.h View 14 chunks +72 lines, -29 lines 2 comments Download
M runtime/vm/intermediate_language.cc View 1 chunk +95 lines, -34 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Kevin Millikin (Google)
1. I think we should consider assigning block numbers as to the entry instructions in ...
8 years, 9 months ago (2012-03-19 18:05:12 UTC) #1
srdjan
LGTM with one comment http://codereview.chromium.org/9730003/diff/1/runtime/vm/intermediate_language.h File runtime/vm/intermediate_language.h (right): http://codereview.chromium.org/9730003/diff/1/runtime/vm/intermediate_language.h#newcode914 runtime/vm/intermediate_language.h:914: BlockEntryInstr* predecessor_; It is not ...
8 years, 9 months ago (2012-03-19 18:43:35 UTC) #2
Kevin Millikin (Google)
8 years, 9 months ago (2012-03-19 18:53:55 UTC) #3
Thanks for the review.  I'll hold off on exposing predecessors for another
change.

http://codereview.chromium.org/9730003/diff/1/runtime/vm/intermediate_language.h
File runtime/vm/intermediate_language.h (right):

http://codereview.chromium.org/9730003/diff/1/runtime/vm/intermediate_languag...
runtime/vm/intermediate_language.h:914: BlockEntryInstr* predecessor_;
On 2012/03/19 18:43:35, srdjan wrote:
> It is not publicly accessible, what is its use? Future use? Add getter? Ditto
> for JoinEntryInstr.

The dominator computation needs to iterate predecessors.

Let me leave it private for now with no accessor.  We might expose an accessor,
but what we really want is some kind of iterator interface, because we don't
want to have to distinguish between Target and Join in most cases just to
iterate the predecessors.

Powered by Google App Engine
This is Rietveld 408576698