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

Issue 10735071: Introduce Goto instructions to the flow graph. (Closed)

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

Description

Introduce Goto instructions to the flow graph. Goto is a control instruction with a single successor. Before: basic blocks ended with an exit (return, throw, or rethrow), a branch to a pair of target entries, or else they fell through to the next block entry. Now: basic blocks end with an exit, a branch, or an explicit goto to a join entry. R=vegorov@google.com,srdjan@google.com BUG= TEST= Committed: https://code.google.com/p/dart/source/detail?r=9731

Patch Set 1 #

Patch Set 2 : Teeny cleanup. #

Patch Set 3 : Rewrite a comment that was word salad. #

Total comments: 18

Patch Set 4 : Incorporated review comments. #

Total comments: 5

Patch Set 5 : Tweaked instruction numbering. #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+297 lines, -212 lines) Patch
M runtime/vm/flow_graph_allocator.cc View 1 2 3 4 2 chunks +79 lines, -62 lines 5 comments Download
M runtime/vm/flow_graph_builder.h View 1 2 3 1 chunk +5 lines, -2 lines 0 comments Download
M runtime/vm/flow_graph_builder.cc View 1 2 16 chunks +106 lines, -123 lines 0 comments Download
M runtime/vm/flow_graph_compiler.cc View 1 2 3 3 chunks +5 lines, -7 lines 0 comments Download
M runtime/vm/flow_graph_compiler_ia32.h View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
M runtime/vm/flow_graph_compiler_x64.h View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
M runtime/vm/flow_graph_optimizer.cc View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M runtime/vm/il_printer.cc View 1 2 3 3 chunks +13 lines, -1 line 0 comments Download
M runtime/vm/intermediate_language.h View 1 2 3 5 chunks +28 lines, -5 lines 0 comments Download
M runtime/vm/intermediate_language.cc View 1 2 3 5 chunks +54 lines, -4 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
Kevin Millikin (Google)
https://chromiumcodereview.appspot.com/10735071/diff/4001/runtime/vm/flow_graph_builder.cc File runtime/vm/flow_graph_builder.cc (right): https://chromiumcodereview.appspot.com/10735071/diff/4001/runtime/vm/flow_graph_builder.cc#newcode991 runtime/vm/flow_graph_builder.cc:991: TargetEntryInstr** previous_false_address = NULL; I refactored this code to ...
8 years, 5 months ago (2012-07-12 11:51:28 UTC) #1
srdjan
LGTM https://chromiumcodereview.appspot.com/10735071/diff/4001/runtime/vm/flow_graph_builder.h File runtime/vm/flow_graph_builder.h (right): https://chromiumcodereview.appspot.com/10735071/diff/4001/runtime/vm/flow_graph_builder.h#newcode126 runtime/vm/flow_graph_builder.h:126: // open. Adapt comment to changed AddInstruction. https://chromiumcodereview.appspot.com/10735071/diff/4001/runtime/vm/flow_graph_builder.h#newcode130 ...
8 years, 5 months ago (2012-07-12 16:42:26 UTC) #2
Vyacheslav Egorov (Google)
https://chromiumcodereview.appspot.com/10735071/diff/4001/runtime/vm/intermediate_language.cc File runtime/vm/intermediate_language.cc (right): https://chromiumcodereview.appspot.com/10735071/diff/4001/runtime/vm/intermediate_language.cc#newcode1032 runtime/vm/intermediate_language.cc:1032: compiler->frame_register_allocator()->Spill(); On 2012/07/12 16:42:26, srdjan wrote: > It looks ...
8 years, 5 months ago (2012-07-13 14:41:42 UTC) #3
Kevin Millikin (Google)
https://chromiumcodereview.appspot.com/10735071/diff/4001/runtime/vm/flow_graph_builder.h File runtime/vm/flow_graph_builder.h (right): https://chromiumcodereview.appspot.com/10735071/diff/4001/runtime/vm/flow_graph_builder.h#newcode130 runtime/vm/flow_graph_builder.h:130: void Goto(JoinEntryInstr* join); On 2012/07/12 16:42:26, srdjan wrote: > ...
8 years, 5 months ago (2012-07-13 15:34:59 UTC) #4
Kevin Millikin (Google)
https://chromiumcodereview.appspot.com/10735071/diff/4001/runtime/vm/intermediate_language.cc File runtime/vm/intermediate_language.cc (right): https://chromiumcodereview.appspot.com/10735071/diff/4001/runtime/vm/intermediate_language.cc#newcode1032 runtime/vm/intermediate_language.cc:1032: compiler->frame_register_allocator()->Spill(); On 2012/07/13 14:41:42, Vyacheslav Egorov (Google) wrote: > ...
8 years, 5 months ago (2012-07-13 15:41:32 UTC) #5
srdjan
Still LGTM once the allocation/spilling at Goto has been agreed upon. https://chromiumcodereview.appspot.com/10735071/diff/4001/runtime/vm/intermediate_language.cc File runtime/vm/intermediate_language.cc (right): ...
8 years, 5 months ago (2012-07-13 23:18:33 UTC) #6
Kevin Millikin (Google)
Comments incorporated. Slava, I had to change the live range computation in flow_graph_allocator.cc to account ...
8 years, 5 months ago (2012-07-16 12:34:32 UTC) #7
Vyacheslav Egorov (Google)
http://codereview.chromium.org/10735071/diff/15001/runtime/vm/flow_graph_allocator.cc File runtime/vm/flow_graph_allocator.cc (right): http://codereview.chromium.org/10735071/diff/15001/runtime/vm/flow_graph_allocator.cc#newcode394 runtime/vm/flow_graph_allocator.cc:394: GotoInstr* goto_instr = current->AsGoto(); I suggest you just don't ...
8 years, 5 months ago (2012-07-16 12:42:55 UTC) #8
Kevin Millikin (Google)
I've uploaded an attempt to fix the instruction numbering and make it agree in both ...
8 years, 5 months ago (2012-07-16 13:47:48 UTC) #9
Kevin Millikin (Google)
http://codereview.chromium.org/10735071/diff/19001/runtime/vm/flow_graph_allocator.cc File runtime/vm/flow_graph_allocator.cc (right): http://codereview.chromium.org/10735071/diff/19001/runtime/vm/flow_graph_allocator.cc#newcode586 runtime/vm/flow_graph_allocator.cc:586: // We do not assign an instruction number to ...
8 years, 5 months ago (2012-07-16 13:49:17 UTC) #10
Vyacheslav Egorov (Google)
positions LGTM http://codereview.chromium.org/10735071/diff/19001/runtime/vm/flow_graph_allocator.cc File runtime/vm/flow_graph_allocator.cc (right): http://codereview.chromium.org/10735071/diff/19001/runtime/vm/flow_graph_allocator.cc#newcode575 runtime/vm/flow_graph_allocator.cc:575: // for phi resolution. there is a ...
8 years, 5 months ago (2012-07-16 14:16:41 UTC) #11
srdjan
some comments http://codereview.chromium.org/10735071/diff/19001/runtime/vm/flow_graph_allocator.cc File runtime/vm/flow_graph_allocator.cc (right): http://codereview.chromium.org/10735071/diff/19001/runtime/vm/flow_graph_allocator.cc#newcode397 runtime/vm/flow_graph_allocator.cc:397: // If we have a parallel move ...
8 years, 5 months ago (2012-07-16 16:50:44 UTC) #12
Kevin Millikin (Google)
8 years, 5 months ago (2012-07-18 09:47:11 UTC) #13
http://codereview.chromium.org/10735071/diff/19001/runtime/vm/flow_graph_allo...
File runtime/vm/flow_graph_allocator.cc (right):

http://codereview.chromium.org/10735071/diff/19001/runtime/vm/flow_graph_allo...
runtime/vm/flow_graph_allocator.cc:442: current = current->previous();
On 2012/07/16 16:50:45, srdjan wrote:
> According to the comment this should this be 'current =
> parallel_move->previous()'  and inside 'if (parallel_move ! = NULL)', no?

Yes.  It's hard to see on the codereview tool, but this is inside parallel_move
!= NULL already and in that case parallel_move == current->AsParallelMove().

Powered by Google App Engine
This is Rietveld 408576698