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

Issue 1537663002: dart2js: Initial implementation of inlining. (Closed)

Created:
5 years ago by Kevin Millikin (Google)
Modified:
5 years ago
Reviewers:
asgerf, floitsch, sra1
CC:
reviews_dartlang.org
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

dart2js: Initial implementation of inlining. Perform a depth-first postorder traversal of the call graph of known functions. Make an inlining decision based on the vector of argument types at the call site, and cache inlining decisions. For positive inlining decisions, cache the optimized function body specialized to the receiver and argument types at the call site. Future work: * Real inlining heuristics. * Propagate result types of inlined calls. * Specialized for constant arguments when it makes sense. * Performance improvements. R=asgerf@google.com, sra@google.com Committed: https://github.com/dart-lang/sdk/commit/d63053fea8731d2fb380022c1c3d296489d1c017 Committed: https://github.com/dart-lang/sdk/commit/044b283a3cd1d684d89ddbb2eadf8cfdc34c4358

Patch Set 1 #

Total comments: 37

Patch Set 2 : Incorporate review comments and rebase. #

Patch Set 3 : Rebaseline test expectations and fix a bug (typo). #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1567 lines, -280 lines) Patch
M pkg/compiler/lib/src/cps_ir/cps_fragment.dart View 1 1 chunk +8 lines, -5 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart View 1 12 chunks +451 lines, -48 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/cps_ir_nodes_sexpr.dart View 1 2 3 chunks +12 lines, -5 lines 0 comments Download
A pkg/compiler/lib/src/cps_ir/inline.dart View 1 1 chunk +495 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/optimizers.dart View 1 1 chunk +1 line, -0 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart View 1 chunk +11 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/type_propagation.dart View 1 3 chunks +41 lines, -39 lines 0 comments Download
M pkg/compiler/lib/src/js_backend/codegen/task.dart View 1 5 chunks +17 lines, -7 lines 0 comments Download
M pkg/pkg.status View 1 1 chunk +5 lines, -0 lines 0 comments Download
M tests/compiler/dart2js/dart2js.status View 1 2 3 chunks +6 lines, -2 lines 0 comments Download
M tests/compiler/dart2js/js_backend_cps_ir_basic_test.dart View 1 2 8 chunks +96 lines, -21 lines 0 comments Download
M tests/compiler/dart2js/js_backend_cps_ir_closures_test.dart View 1 2 11 chunks +79 lines, -19 lines 0 comments Download
M tests/compiler/dart2js/js_backend_cps_ir_codeUnitAt_test.dart View 1 2 1 chunk +10 lines, -1 line 0 comments Download
M tests/compiler/dart2js/js_backend_cps_ir_constructor_test.dart View 1 2 14 chunks +92 lines, -36 lines 0 comments Download
M tests/compiler/dart2js/js_backend_cps_ir_control_flow_test.dart View 1 2 6 chunks +46 lines, -22 lines 0 comments Download
M tests/compiler/dart2js/js_backend_cps_ir_gvn_test.dart View 1 2 2 chunks +18 lines, -12 lines 0 comments Download
M tests/compiler/dart2js/js_backend_cps_ir_interceptors_test.dart View 1 2 1 chunk +10 lines, -1 line 0 comments Download
M tests/compiler/dart2js/js_backend_cps_ir_operators2_test.dart View 1 2 4 chunks +26 lines, -23 lines 0 comments Download
M tests/compiler/dart2js/js_backend_cps_ir_operators_test.dart View 1 2 2 chunks +76 lines, -19 lines 0 comments Download
M tests/compiler/dart2js/js_backend_cps_ir_runtime_types_test.dart View 1 2 4 chunks +36 lines, -11 lines 0 comments Download
M tests/compiler/dart2js/js_backend_cps_ir_supercall_test.dart View 1 2 4 chunks +26 lines, -6 lines 0 comments Download
M tests/isolate/isolate.status View 1 1 chunk +0 lines, -1 line 0 comments Download
M tests/language/language_dart2js.status View 1 4 chunks +5 lines, -2 lines 0 comments Download

Messages

Total messages: 13 (4 generated)
Kevin Millikin (Google)
There are nine tests whose expectations have changed. Some of them are new timeouts (and ...
5 years ago (2015-12-17 13:12:27 UTC) #2
asgerf
LGTM with comments addressed. On the few benchmarks I looked at, it seems to be ...
5 years ago (2015-12-17 15:40:35 UTC) #3
sra1
I see some evidence that the node receiver (i.e. interceptor), and not the dart receiver, ...
5 years ago (2015-12-17 23:09:14 UTC) #4
sra1
LGTM with receiver null check addressed. I played with re-running type_propagation and I think the ...
5 years ago (2015-12-18 02:16:26 UTC) #5
Kevin Millikin (Google)
https://codereview.chromium.org/1537663002/diff/1/pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart File pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart (right): https://codereview.chromium.org/1537663002/diff/1/pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart#newcode2439 pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart:2439: copy.type = (original as Variable).type; On 2015/12/18 02:16:26, sra1 ...
5 years ago (2015-12-21 12:28:03 UTC) #6
Kevin Millikin (Google)
Committed patchset #2 (id:20001) manually as d63053fea8731d2fb380022c1c3d296489d1c017 (presubmit successful).
5 years ago (2015-12-22 11:50:36 UTC) #8
Kevin Millikin (Google)
+floitsch Oops, I didn't rebaseline the compiler test expectations before I committed this initially. I ...
5 years ago (2015-12-22 16:26:31 UTC) #10
Kevin Millikin (Google)
Link to the revert CL: https://codereview.chromium.org/1542003003/
5 years ago (2015-12-22 16:27:26 UTC) #11
Kevin Millikin (Google)
5 years ago (2015-12-23 09:12:33 UTC) #13
Message was sent while issue was closed.
Committed patchset #3 (id:40001) manually as
044b283a3cd1d684d89ddbb2eadf8cfdc34c4358 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698