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

Issue 1410733006: More general CHA-based inlining and devirtualization for precompiled code. (Closed)

Created:
5 years, 2 months ago by Florian Schneider
Modified:
5 years, 2 months ago
Reviewers:
rmacnak, srdjan
CC:
reviews_dartlang.org, vm-dev_dartlang.org, siva
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

More general CHA-based inlining and devirtualization for precompiled code. Generalize current approach used for implicit getters/setters to all instance calls. Additionally use propagated type to resolve targets if no concrete cid is known: class A { void m() { } void n() => m(); } class B extends A { } Even though the receiver type in n() can be A or B (concrete cid unknown), we can still call m() directly since it is not overridden. Also, allow inlining of methods that were not compiled yet in precompiled code. BUG= R=rmacnak@google.com, srdjan@google.com Committed: https://github.com/dart-lang/sdk/commit/36e63481e026d91710139750dd57e2f2a43a3bc7

Patch Set 1 #

Patch Set 2 : #

Total comments: 12

Patch Set 3 : addressed comments, fixed type propagation assertion failure #

Unified diffs Side-by-side diffs Delta from patch set Stats (+113 lines, -28 lines) Patch
M runtime/vm/cha.cc View 1 chunk +8 lines, -2 lines 0 comments Download
M runtime/vm/flow_graph_compiler.cc View 1 2 1 chunk +1 line, -3 lines 0 comments Download
M runtime/vm/flow_graph_inliner.cc View 1 2 1 chunk +10 lines, -0 lines 0 comments Download
M runtime/vm/flow_graph_optimizer.cc View 1 2 5 chunks +89 lines, -19 lines 0 comments Download
M runtime/vm/flow_graph_type_propagator.cc View 1 2 1 chunk +5 lines, -1 line 0 comments Download
M runtime/vm/intermediate_language.h View 1 2 1 chunk +0 lines, -2 lines 0 comments Download
M runtime/vm/object.cc View 1 2 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 11 (4 generated)
Florian Schneider
5 years, 2 months ago (2015-10-21 13:14:47 UTC) #2
srdjan
DBC https://codereview.chromium.org/1410733006/diff/20001/runtime/vm/block_scheduler.cc File runtime/vm/block_scheduler.cc (right): https://codereview.chromium.org/1410733006/diff/20001/runtime/vm/block_scheduler.cc#newcode65 runtime/vm/block_scheduler.cc:65: return; When can this happen? In precompilation FLAG_emit_edge_counters ...
5 years, 2 months ago (2015-10-21 17:37:46 UTC) #6
rmacnak
https://codereview.chromium.org/1410733006/diff/20001/runtime/vm/flow_graph_compiler.cc File runtime/vm/flow_graph_compiler.cc (right): https://codereview.chromium.org/1410733006/diff/20001/runtime/vm/flow_graph_compiler.cc#newcode257 runtime/vm/flow_graph_compiler.cc:257: may_reoptimize_ = true; Can we rename this to has_ic_calls_ ...
5 years, 2 months ago (2015-10-21 18:00:30 UTC) #7
Florian Schneider
https://codereview.chromium.org/1410733006/diff/20001/runtime/vm/block_scheduler.cc File runtime/vm/block_scheduler.cc (right): https://codereview.chromium.org/1410733006/diff/20001/runtime/vm/block_scheduler.cc#newcode65 runtime/vm/block_scheduler.cc:65: return; On 2015/10/21 17:37:46, srdjan wrote: > When can ...
5 years, 2 months ago (2015-10-22 13:59:26 UTC) #8
srdjan
LGTM https://codereview.chromium.org/1410733006/diff/20001/runtime/vm/flow_graph_inliner.cc File runtime/vm/flow_graph_inliner.cc (right): https://codereview.chromium.org/1410733006/diff/20001/runtime/vm/flow_graph_inliner.cc#newcode631 runtime/vm/flow_graph_inliner.cc:631: // precompilation mode we don't rely on type ...
5 years, 2 months ago (2015-10-22 15:31:26 UTC) #9
rmacnak
lgtm
5 years, 2 months ago (2015-10-22 16:32:54 UTC) #10
Florian Schneider
5 years, 2 months ago (2015-10-23 11:34:37 UTC) #11
Message was sent while issue was closed.
Committed patchset #3 (id:40001) manually as
36e63481e026d91710139750dd57e2f2a43a3bc7 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698