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

Side by Side Diff: runtime/vm/intermediate_language_mips.cc

Issue 657613004: VM: Avoid repeated deoptimization on speculatively hoisted smi-checks. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/intermediate_language_ia32.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS.
6 #if defined(TARGET_ARCH_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 3043 matching lines...) Expand 10 before | Expand all | Expand 10 after
3054 LocationSummary* summary = new(isolate) LocationSummary( 3054 LocationSummary* summary = new(isolate) LocationSummary(
3055 isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall); 3055 isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall);
3056 summary->set_in(0, Location::RequiresRegister()); 3056 summary->set_in(0, Location::RequiresRegister());
3057 summary->set_in(1, Location::RequiresRegister()); 3057 summary->set_in(1, Location::RequiresRegister());
3058 return summary; 3058 return summary;
3059 } 3059 }
3060 3060
3061 3061
3062 void CheckEitherNonSmiInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 3062 void CheckEitherNonSmiInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
3063 Label* deopt = compiler->AddDeoptStub(deopt_id(), 3063 Label* deopt = compiler->AddDeoptStub(deopt_id(),
3064 ICData::kDeoptBinaryDoubleOp); 3064 ICData::kDeoptBinaryDoubleOp,
3065 licm_hoisted_ ? ICData::kHoisted : 0);
3065 intptr_t left_cid = left()->Type()->ToCid(); 3066 intptr_t left_cid = left()->Type()->ToCid();
3066 intptr_t right_cid = right()->Type()->ToCid(); 3067 intptr_t right_cid = right()->Type()->ToCid();
3067 Register left = locs()->in(0).reg(); 3068 Register left = locs()->in(0).reg();
3068 Register right = locs()->in(1).reg(); 3069 Register right = locs()->in(1).reg();
3069 if (this->left()->definition() == this->right()->definition()) { 3070 if (this->left()->definition() == this->right()->definition()) {
3070 __ andi(CMPRES1, left, Immediate(kSmiTagMask)); 3071 __ andi(CMPRES1, left, Immediate(kSmiTagMask));
3071 } else if (left_cid == kSmiCid) { 3072 } else if (left_cid == kSmiCid) {
3072 __ andi(CMPRES1, right, Immediate(kSmiTagMask)); 3073 __ andi(CMPRES1, right, Immediate(kSmiTagMask));
3073 } else if (right_cid == kSmiCid) { 3074 } else if (right_cid == kSmiCid) {
3074 __ andi(CMPRES1, left, Immediate(kSmiTagMask)); 3075 __ andi(CMPRES1, left, Immediate(kSmiTagMask));
(...skipping 1331 matching lines...) Expand 10 before | Expand all | Expand 10 after
4406 LocationSummary* summary = new(isolate) LocationSummary( 4407 LocationSummary* summary = new(isolate) LocationSummary(
4407 isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall); 4408 isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall);
4408 summary->set_in(0, Location::RequiresRegister()); 4409 summary->set_in(0, Location::RequiresRegister());
4409 return summary; 4410 return summary;
4410 } 4411 }
4411 4412
4412 4413
4413 void CheckSmiInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 4414 void CheckSmiInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
4414 __ TraceSimMsg("CheckSmiInstr"); 4415 __ TraceSimMsg("CheckSmiInstr");
4415 Register value = locs()->in(0).reg(); 4416 Register value = locs()->in(0).reg();
4416 Label* deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptCheckSmi); 4417 Label* deopt = compiler->AddDeoptStub(deopt_id(),
4418 ICData::kDeoptCheckSmi,
4419 licm_hoisted_ ? ICData::kHoisted : 0);
4417 __ andi(CMPRES1, value, Immediate(kSmiTagMask)); 4420 __ andi(CMPRES1, value, Immediate(kSmiTagMask));
4418 __ bne(CMPRES1, ZR, deopt); 4421 __ bne(CMPRES1, ZR, deopt);
4419 } 4422 }
4420 4423
4421 4424
4422 LocationSummary* CheckClassIdInstr::MakeLocationSummary(Isolate* isolate, 4425 LocationSummary* CheckClassIdInstr::MakeLocationSummary(Isolate* isolate,
4423 bool opt) const { 4426 bool opt) const {
4424 const intptr_t kNumInputs = 1; 4427 const intptr_t kNumInputs = 1;
4425 const intptr_t kNumTemps = 0; 4428 const intptr_t kNumTemps = 0;
4426 LocationSummary* summary = new(isolate) LocationSummary( 4429 LocationSummary* summary = new(isolate) LocationSummary(
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
4943 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); 4946 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs());
4944 #if defined(DEBUG) 4947 #if defined(DEBUG)
4945 __ LoadImmediate(S4, kInvalidObjectPointer); 4948 __ LoadImmediate(S4, kInvalidObjectPointer);
4946 __ LoadImmediate(S5, kInvalidObjectPointer); 4949 __ LoadImmediate(S5, kInvalidObjectPointer);
4947 #endif 4950 #endif
4948 } 4951 }
4949 4952
4950 } // namespace dart 4953 } // namespace dart
4951 4954
4952 #endif // defined TARGET_ARCH_MIPS 4955 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_ia32.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698