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

Issue 10431006: First step toward an optimizing compiler: (Closed)

Created:
8 years, 7 months ago by srdjan
Modified:
8 years, 7 months ago
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

First step toward an optimizing compiler: - Fix ic-data instrumentation - Optimize '+' for Smi-s only, by replacing the instance call with inlined operations. - Add deoptimization stub - Add deoptimzation support. Committed: https://code.google.com/p/dart/source/detail?r=7952

Patch Set 1 #

Patch Set 2 : #

Total comments: 2

Patch Set 3 : #

Total comments: 12

Patch Set 4 : #

Total comments: 4

Patch Set 5 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+460 lines, -67 lines) Patch
M runtime/vm/compiler.cc View 1 2 3 4 5 chunks +11 lines, -2 lines 0 comments Download
M runtime/vm/flow_graph_builder.h View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M runtime/vm/flow_graph_builder.cc View 1 2 3 4 13 chunks +15 lines, -19 lines 0 comments Download
M runtime/vm/flow_graph_compiler_x64.h View 1 2 3 4 4 chunks +13 lines, -0 lines 0 comments Download
M runtime/vm/flow_graph_compiler_x64.cc View 1 2 3 4 7 chunks +77 lines, -0 lines 0 comments Download
A runtime/vm/flow_graph_optimizer.h View 1 chunk +35 lines, -0 lines 0 comments Download
A runtime/vm/flow_graph_optimizer.cc View 1 2 3 4 1 chunk +119 lines, -0 lines 0 comments Download
M runtime/vm/il_printer.h View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M runtime/vm/il_printer.cc View 1 2 3 4 7 chunks +28 lines, -9 lines 0 comments Download
M runtime/vm/intermediate_language.h View 1 2 3 4 13 chunks +73 lines, -32 lines 0 comments Download
M runtime/vm/intermediate_language.cc View 1 2 3 4 1 chunk +6 lines, -0 lines 0 comments Download
M runtime/vm/intermediate_language_test.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/intermediate_language_x64.cc View 1 2 3 4 3 chunks +76 lines, -0 lines 0 comments Download
M runtime/vm/stub_code_x64.cc View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M runtime/vm/vm_sources.gypi View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
srdjan
8 years, 7 months ago (2012-05-23 22:11:12 UTC) #1
Florian Schneider
https://chromiumcodereview.appspot.com/10431006/diff/8003/runtime/vm/compiler.cc File runtime/vm/compiler.cc (right): https://chromiumcodereview.appspot.com/10431006/diff/8003/runtime/vm/compiler.cc#newcode159 runtime/vm/compiler.cc:159: isolate->set_computation_id(0); How about making the computation_id per FlowGraphBuilder instead ...
8 years, 7 months ago (2012-05-24 00:20:38 UTC) #2
srdjan
Please take another look. https://chromiumcodereview.appspot.com/10431006/diff/8003/runtime/vm/compiler.cc File runtime/vm/compiler.cc (right): https://chromiumcodereview.appspot.com/10431006/diff/8003/runtime/vm/compiler.cc#newcode159 runtime/vm/compiler.cc:159: isolate->set_computation_id(0); On 2012/05/24 00:20:38, Florian ...
8 years, 7 months ago (2012-05-24 01:36:26 UTC) #3
Florian Schneider
lgtm https://chromiumcodereview.appspot.com/10431006/diff/16001/runtime/vm/flow_graph_optimizer.cc File runtime/vm/flow_graph_optimizer.cc (right): https://chromiumcodereview.appspot.com/10431006/diff/16001/runtime/vm/flow_graph_optimizer.cc#newcode64 runtime/vm/flow_graph_optimizer.cc:64: if (!classes.is_empty()) { It seems that after the ...
8 years, 7 months ago (2012-05-24 02:13:29 UTC) #4
srdjan
8 years, 7 months ago (2012-05-24 16:41:18 UTC) #5
https://chromiumcodereview.appspot.com/10431006/diff/16001/runtime/vm/flow_gr...
File runtime/vm/flow_graph_optimizer.cc (right):

https://chromiumcodereview.appspot.com/10431006/diff/16001/runtime/vm/flow_gr...
runtime/vm/flow_graph_optimizer.cc:64: if (!classes.is_empty()) {
On 2012/05/24 02:13:30, Florian Schneider wrote:
> It seems that after the check (ic_data.num_args_tested() != 2), classes can't
be
> empty. Maybe say instead:
> 
> ASSERT(!classes.is_empty());

Converted to assert:
ASSERT(classes.length() == 2)

https://chromiumcodereview.appspot.com/10431006/diff/16001/runtime/vm/interme...
File runtime/vm/intermediate_language_x64.cc (right):

https://chromiumcodereview.appspot.com/10431006/diff/16001/runtime/vm/interme...
runtime/vm/intermediate_language_x64.cc:586: __ pushq(right);
On 2012/05/24 02:13:30, Florian Schneider wrote:
> It would be nice to avoid having to push the arguments back before emitting
the
> instance call code if inlining does not work out.
> 
> Would it be possible to determine already in the FlowGraphOptimizer whether to
> inline or not, so that we don't have to deal with the non-inlined case here?

This code is only transition code (adding comment).
 Yes, the optimizer should convert to binop only if the inlining is possible.

  // TODO(srdjan): Remove this code once BinaryOpComp has been implemeneted
  // for all intended operations.

Powered by Google App Engine
This is Rietveld 408576698