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

Issue 10967007: Inlining functions with control flow. (Closed)

Created:
8 years, 3 months ago by zerny-google
Modified:
8 years, 2 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Inlining functions with control flow. Functions containing control flow are now inlined and incrementally extend the graph in SSA form. For the special case of a function with only one exit, we locally update the dominator tree. If multiple exits occur, we currently recompute the dominator tree for the full resulting graph. Committed: https://code.google.com/p/dart/source/detail?r=12990

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Total comments: 24

Patch Set 5 : Review update. #

Patch Set 6 : #

Patch Set 7 : #

Patch Set 8 : Added tests. #

Patch Set 9 : #

Total comments: 2

Patch Set 10 : Attach outer env everywhere. #

Patch Set 11 : New tests #

Patch Set 12 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+375 lines, -100 lines) Patch
M runtime/vm/flow_graph.h View 3 chunks +8 lines, -1 line 0 comments Download
M runtime/vm/flow_graph.cc View 1 2 3 4 5 6 7 8 9 5 chunks +143 lines, -23 lines 0 comments Download
M runtime/vm/flow_graph_builder.h View 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/flow_graph_builder.cc View 1 2 3 4 5 6 chunks +1 line, -6 lines 0 comments Download
M runtime/vm/flow_graph_inliner.cc View 1 2 3 4 5 6 6 chunks +85 lines, -53 lines 0 comments Download
M runtime/vm/il_printer.cc View 1 2 3 4 2 chunks +11 lines, -1 line 0 comments Download
M runtime/vm/intermediate_language.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
A + tests/language/deopt_inlined_function_lazy_test.dart View 1 2 3 4 5 6 7 8 2 chunks +9 lines, -13 lines 0 comments Download
M tests/language/deopt_inlined_function_test.dart View 1 2 3 4 5 6 7 2 chunks +2 lines, -3 lines 0 comments Download
A tests/language/inline_effect_context_test.dart View 1 2 3 4 5 6 7 8 9 10 1 chunk +36 lines, -0 lines 0 comments Download
A tests/language/inline_test_context_test.dart View 1 2 3 4 5 6 7 8 9 10 1 chunk +39 lines, -0 lines 0 comments Download
A tests/language/inline_value_context_test.dart View 1 2 3 4 5 6 7 8 9 10 1 chunk +39 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
zerny-google
Add inlining of code containing control flow. Inlining is split into two phases: 1) find ...
8 years, 3 months ago (2012-09-24 11:37:29 UTC) #1
zerny-google
Add inlining of code containing control flow. Inlining is split into two phases: 1) find ...
8 years, 3 months ago (2012-09-24 11:37:59 UTC) #2
Kevin Millikin (Google)
I like the approach. Comments below, all on the actual mechanics of inlining into the ...
8 years, 3 months ago (2012-09-24 14:45:51 UTC) #3
zerny-google
Hi Slava, This patch set addresses Kevin's comments. Could you have a look if this ...
8 years, 2 months ago (2012-09-25 10:51:32 UTC) #4
zerny-google
Added some test programs.
8 years, 2 months ago (2012-09-26 11:51:42 UTC) #5
srdjan
http://codereview.chromium.org/10967007/diff/11003/tests/language/inline_value_context_test.dart File tests/language/inline_value_context_test.dart (right): http://codereview.chromium.org/10967007/diff/11003/tests/language/inline_value_context_test.dart#newcode39 tests/language/inline_value_context_test.dart:39: InlineValueContext.testMain(); Since testMain runs only once, the optimized version ...
8 years, 2 months ago (2012-09-26 13:13:33 UTC) #6
zerny-google
8 years, 2 months ago (2012-09-27 10:21:46 UTC) #7
Hi Srdjan,

Thanks for the feedback. I have updated the tests accordingly.

http://codereview.chromium.org/10967007/diff/11003/tests/language/inline_valu...
File tests/language/inline_value_context_test.dart (right):

http://codereview.chromium.org/10967007/diff/11003/tests/language/inline_valu...
tests/language/inline_value_context_test.dart:39: InlineValueContext.testMain();
On 2012/09/26 13:13:33, srdjan wrote:
> Since testMain runs only once, the optimized version will never run, will it?

Indeed. This should really be a test with two nested frames and the top one
occurring in a value context.

Powered by Google App Engine
This is Rietveld 408576698