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

Issue 11363141: Improve smi shift operations and avoid repeated deoptimizations. (Closed)

Created:
8 years, 1 month ago by Florian Schneider
Modified:
8 years, 1 month ago
Reviewers:
srdjan
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Improve smi shift operations and avoid repeated deoptimizations. Smi left shifts do not contain a call now. Only after deoptimizing at a smi operation we we generate mint code or a generic call to avoid repeated deoptimization. Added a test case for the code that was not covered by existing tests. Committed: https://code.google.com/p/dart/source/detail?r=14709

Patch Set 1 #

Patch Set 2 : #

Total comments: 17

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+144 lines, -104 lines) Patch
M runtime/vm/code_generator.h View 1 2 chunks +0 lines, -18 lines 0 comments Download
M runtime/vm/code_generator.cc View 1 3 chunks +6 lines, -3 lines 0 comments Download
M runtime/vm/deopt_instructions.h View 1 2 4 chunks +6 lines, -1 line 0 comments Download
M runtime/vm/deopt_instructions.cc View 1 2 4 chunks +10 lines, -1 line 0 comments Download
M runtime/vm/flow_graph_optimizer.cc View 1 2 6 chunks +26 lines, -6 lines 0 comments Download
M runtime/vm/intermediate_language_ia32.cc View 1 2 4 chunks +34 lines, -37 lines 0 comments Download
M runtime/vm/intermediate_language_x64.cc View 1 2 4 chunks +35 lines, -37 lines 0 comments Download
M runtime/vm/object.h View 1 1 chunk +6 lines, -0 lines 0 comments Download
M runtime/vm/object.cc View 1 2 chunks +6 lines, -0 lines 0 comments Download
M runtime/vm/raw_object.h View 1 2 2 chunks +1 line, -1 line 0 comments Download
M tests/language/arithmetic_test.dart View 1 2 chunks +14 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Florian Schneider
8 years, 1 month ago (2012-11-08 21:10:34 UTC) #1
srdjan
LGTM https://codereview.chromium.org/11363141/diff/1012/runtime/vm/deopt_instructions.cc File runtime/vm/deopt_instructions.cc (right): https://codereview.chromium.org/11363141/diff/1012/runtime/vm/deopt_instructions.cc#newcode272 runtime/vm/deopt_instructions.cc:272: } This could be: uword pc = code.GetPcForDeoptId(deopt_id_, ...
8 years, 1 month ago (2012-11-08 21:37:27 UTC) #2
Florian Schneider
8 years, 1 month ago (2012-11-08 22:03:00 UTC) #3
https://codereview.chromium.org/11363141/diff/1012/runtime/vm/deopt_instructi...
File runtime/vm/deopt_instructions.cc (right):

https://codereview.chromium.org/11363141/diff/1012/runtime/vm/deopt_instructi...
runtime/vm/deopt_instructions.cc:272: }
On 2012/11/08 21:37:27, srdjan wrote:
> This could be:
> uword pc = code.GetPcForDeoptId(deopt_id_, PcDescriptors::kIcCall)
> ic_data = CodePatcher::GetInstanceCallIcDataAt(pc);

Done.

https://codereview.chromium.org/11363141/diff/1012/runtime/vm/deopt_instructi...
File runtime/vm/deopt_instructions.h (right):

https://codereview.chromium.org/11363141/diff/1012/runtime/vm/deopt_instructi...
runtime/vm/deopt_instructions.h:78: DeoptReasonId deopt_reason_;
On 2012/11/08 21:37:27, srdjan wrote:
> const

Done.

https://codereview.chromium.org/11363141/diff/1012/runtime/vm/flow_graph_opti...
File runtime/vm/flow_graph_optimizer.cc (right):

https://codereview.chromium.org/11363141/diff/1012/runtime/vm/flow_graph_opti...
runtime/vm/flow_graph_optimizer.cc:693: if (ic_data.deopt_reason() ==
kDeoptBinaryMintOp)  return false;
On 2012/11/08 21:37:27, srdjan wrote:
> one space too much before 'return false'.

Done.

https://codereview.chromium.org/11363141/diff/1012/runtime/vm/flow_graph_opti...
runtime/vm/flow_graph_optimizer.cc:706: if (ic_data.deopt_reason() ==
kDeoptBinarySmiOp)  return false;
On 2012/11/08 21:37:27, srdjan wrote:
> ditto

Done.

https://codereview.chromium.org/11363141/diff/1012/runtime/vm/flow_graph_opti...
runtime/vm/flow_graph_optimizer.cc:744: // of an overflow.
On 2012/11/08 21:37:27, srdjan wrote:
> Why is test FlowGraphCompiler::SupportsUnboxedMints() removed?

Instead of testing it here in many places, I moved it down for less code
duplication.

https://codereview.chromium.org/11363141/diff/1012/runtime/vm/intermediate_la...
File runtime/vm/intermediate_language_ia32.cc (right):

https://codereview.chromium.org/11363141/diff/1012/runtime/vm/intermediate_la...
runtime/vm/intermediate_language_ia32.cc:1829: __ jmp(deopt);
On 2012/11/08 21:37:27, srdjan wrote:
> Make a note that this may not be known at instruction creation time (because
of
> constant propagation, inlining, ...)

Done.

https://codereview.chromium.org/11363141/diff/1012/runtime/vm/intermediate_la...
File runtime/vm/intermediate_language_x64.cc (right):

https://codereview.chromium.org/11363141/diff/1012/runtime/vm/intermediate_la...
runtime/vm/intermediate_language_x64.cc:1703: if (value < 0 || value >=
kCountLimit) {
On 2012/11/08 21:37:27, srdjan wrote:
> Same comments as from ia32.

Done.

https://codereview.chromium.org/11363141/diff/1012/runtime/vm/raw_object.h
File runtime/vm/raw_object.h (right):

https://codereview.chromium.org/11363141/diff/1012/runtime/vm/raw_object.h#ne...
runtime/vm/raw_object.h:928: intptr_t deopt_reason_;     // Last deoptimization
reason.
On 2012/11/08 21:37:27, srdjan wrote:
> uint8_t

Done.

Powered by Google App Engine
This is Rietveld 408576698