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

Issue 12412013: Add pass to remove empty blocks and recompute fall-through targets. (Closed)

Created:
7 years, 9 months ago by Vyacheslav Egorov (Google)
Modified:
7 years, 9 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Add pass to remove empty blocks and recompute fall-through targets. This allows to cleanup the following code patterns: 1) chains of jumps: jxx block_a ... block_a: jmp block_b 2) jumps over jumps jxx block_b block_a: jmp block_c block_b: ... Committed: https://code.google.com/p/dart/source/detail?r=19711

Patch Set 1 #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+140 lines, -44 lines) Patch
M runtime/vm/flow_graph_compiler.h View 3 chunks +36 lines, -5 lines 6 comments Download
M runtime/vm/flow_graph_compiler.cc View 2 chunks +64 lines, -7 lines 0 comments Download
M runtime/vm/flow_graph_compiler_arm.cc View 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/flow_graph_compiler_ia32.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M runtime/vm/flow_graph_compiler_mips.cc View 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/flow_graph_compiler_x64.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M runtime/vm/intermediate_language.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M runtime/vm/intermediate_language_ia32.cc View 3 chunks +16 lines, -12 lines 0 comments Download
M runtime/vm/intermediate_language_x64.cc View 2 chunks +14 lines, -10 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
Vyacheslav Egorov (Google)
Please take a look.
7 years, 9 months ago (2013-03-08 17:47:45 UTC) #1
srdjan
The common pattern (e.g., BubbleSort::sort) is: .. jmp C B: jmp C C: Have you ...
7 years, 9 months ago (2013-03-08 17:50:42 UTC) #2
srdjan
LGTM https://codereview.chromium.org/12412013/diff/1/runtime/vm/flow_graph_compiler.h File runtime/vm/flow_graph_compiler.h (right): https://codereview.chromium.org/12412013/diff/1/runtime/vm/flow_graph_compiler.h#newcode175 runtime/vm/flow_graph_compiler.h:175: Label* fallthrough_label() const { return fallthrough_label_; } ASSERT ...
7 years, 9 months ago (2013-03-08 19:02:31 UTC) #3
Vyacheslav Egorov (Google)
https://codereview.chromium.org/12412013/diff/1/runtime/vm/flow_graph_compiler.h File runtime/vm/flow_graph_compiler.h (right): https://codereview.chromium.org/12412013/diff/1/runtime/vm/flow_graph_compiler.h#newcode175 runtime/vm/flow_graph_compiler.h:175: Label* fallthrough_label() const { return fallthrough_label_; } On 2013/03/08 ...
7 years, 9 months ago (2013-03-08 19:04:23 UTC) #4
srdjan
https://codereview.chromium.org/12412013/diff/1/runtime/vm/flow_graph_compiler.h File runtime/vm/flow_graph_compiler.h (right): https://codereview.chromium.org/12412013/diff/1/runtime/vm/flow_graph_compiler.h#newcode175 runtime/vm/flow_graph_compiler.h:175: Label* fallthrough_label() const { return fallthrough_label_; } On 2013/03/08 ...
7 years, 9 months ago (2013-03-08 19:08:08 UTC) #5
Vyacheslav Egorov (Google)
Committed patchset #1 manually as r19711 (presubmit successful).
7 years, 9 months ago (2013-03-08 19:10:04 UTC) #6
Vyacheslav Egorov (Google)
7 years, 9 months ago (2013-03-08 19:10:11 UTC) #7
Message was sent while issue was closed.
https://codereview.chromium.org/12412013/diff/1/runtime/vm/flow_graph_compiler.h
File runtime/vm/flow_graph_compiler.h (right):

https://codereview.chromium.org/12412013/diff/1/runtime/vm/flow_graph_compile...
runtime/vm/flow_graph_compiler.h:175: Label* fallthrough_label() const { return
fallthrough_label_; }
On 2013/03/08 19:08:08, srdjan wrote:
> On 2013/03/08 19:04:23, Vyacheslav Egorov (Google) wrote:
> > On 2013/03/08 19:02:31, srdjan wrote:
> > > ASSERT that is not NULL?
> > 
> > It can be NULL for the last block which has no fallthrough.
> 
> Right. Maybe add a comment that it is NULL for blocks without fall-throughs..

Done.

Powered by Google App Engine
This is Rietveld 408576698