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

Issue 178193020: Better inlining of type tests. (Closed)

Created:
6 years, 9 months ago by Florian Schneider
Modified:
6 years, 9 months ago
Reviewers:
regis, srdjan
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Better inlining of type tests. The optimizing compiler can replace a type test with a cid-comparison under certain conditions. This CL translates the instance-of call into a inline comparison in the optimizer and not - as previously - in the code generator. This results in better generated code for like if (x is y) {...} when y does not have sub-classes and does not have type arguments. R=regis@google.com Committed: https://code.google.com/p/dart/source/detail?r=33231

Patch Set 1 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+50 lines, -85 lines) Patch
M runtime/vm/flow_graph_compiler.cc View 1 chunk +0 lines, -29 lines 0 comments Download
M runtime/vm/flow_graph_compiler_arm.cc View 1 chunk +0 lines, -14 lines 0 comments Download
M runtime/vm/flow_graph_compiler_ia32.cc View 1 chunk +0 lines, -14 lines 0 comments Download
M runtime/vm/flow_graph_compiler_mips.cc View 1 chunk +0 lines, -14 lines 0 comments Download
M runtime/vm/flow_graph_compiler_x64.cc View 1 chunk +0 lines, -14 lines 0 comments Download
M runtime/vm/flow_graph_optimizer.cc View 2 chunks +50 lines, -0 lines 4 comments Download

Messages

Total messages: 6 (0 generated)
Florian Schneider
6 years, 9 months ago (2014-03-03 16:58:43 UTC) #1
regis
LGTM https://codereview.chromium.org/178193020/diff/1/runtime/vm/flow_graph_optimizer.cc File runtime/vm/flow_graph_optimizer.cc (right): https://codereview.chromium.org/178193020/diff/1/runtime/vm/flow_graph_optimizer.cc#newcode3565 runtime/vm/flow_graph_optimizer.cc:3565: // Requires CHA, which can be applied in ...
6 years, 9 months ago (2014-03-03 17:54:25 UTC) #2
Florian Schneider
Committed patchset #1 manually as r33231 (presubmit successful).
6 years, 9 months ago (2014-03-03 18:09:05 UTC) #3
Florian Schneider
https://codereview.chromium.org/178193020/diff/1/runtime/vm/flow_graph_optimizer.cc File runtime/vm/flow_graph_optimizer.cc (right): https://codereview.chromium.org/178193020/diff/1/runtime/vm/flow_graph_optimizer.cc#newcode3565 runtime/vm/flow_graph_optimizer.cc:3565: // Requires CHA, which can be applied in optimized ...
6 years, 9 months ago (2014-03-03 18:09:50 UTC) #4
srdjan
DBC https://codereview.chromium.org/178193020/diff/1/runtime/vm/flow_graph_optimizer.cc File runtime/vm/flow_graph_optimizer.cc (right): https://codereview.chromium.org/178193020/diff/1/runtime/vm/flow_graph_optimizer.cc#newcode3623 runtime/vm/flow_graph_optimizer.cc:3623: if (TypeCheckAsClassEquality(type)) { For next CL eventually: how ...
6 years, 9 months ago (2014-03-03 18:13:24 UTC) #5
Florian Schneider
6 years, 9 months ago (2014-03-04 10:22:52 UTC) #6
Message was sent while issue was closed.
https://codereview.chromium.org/178193020/diff/1/runtime/vm/flow_graph_optimi...
File runtime/vm/flow_graph_optimizer.cc (right):

https://codereview.chromium.org/178193020/diff/1/runtime/vm/flow_graph_optimi...
runtime/vm/flow_graph_optimizer.cc:3623: if (TypeCheckAsClassEquality(type)) {
On 2014/03/03 18:13:25, srdjan wrote:
> For next CL eventually: how about supporting a set of cid-s, e.g., if the
class
> has only a small number of subclasses?

Definitely.

Powered by Google App Engine
This is Rietveld 408576698