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

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

Issue 18111006: Collect edge count profiling data and reorder basic blocks. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Incorporated review comments. Created 7 years, 3 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 3830 matching lines...) Expand 10 before | Expand all | Expand 10 after
3841 3841
3842 void ReThrowInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 3842 void ReThrowInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
3843 compiler->GenerateCallRuntime(token_pos(), 3843 compiler->GenerateCallRuntime(token_pos(),
3844 deopt_id(), 3844 deopt_id(),
3845 kReThrowRuntimeEntry, 3845 kReThrowRuntimeEntry,
3846 locs()); 3846 locs());
3847 __ break_(0); 3847 __ break_(0);
3848 } 3848 }
3849 3849
3850 3850
3851 void TargetEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
3852 __ Bind(compiler->GetJumpLabel(this));
3853 if (!compiler->is_optimizing()) {
3854 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt,
3855 deopt_id_,
3856 Scanner::kDummyTokenIndex);
3857 // Add an edge counter.
3858 const Array& counter = Array::ZoneHandle(Array::New(1, Heap::kOld));
3859 counter.SetAt(0, Smi::Handle(Smi::New(0)));
3860 Label done;
3861 __ Comment("Edge counter");
3862 __ LoadObject(T0, counter);
3863 __ lw(T1, FieldAddress(T0, Array::element_offset(0)));
3864 __ AddImmediateDetectOverflow(T1, T1, Smi::RawValue(1), CMPRES, T2);
3865 __ bgez(CMPRES, &done);
3866 __ delay_slot()->sw(T1, FieldAddress(T0, Array::element_offset(0)));
3867 __ LoadImmediate(TMP1, Smi::RawValue(Smi::kMaxValue));
3868 __ sw(TMP1, FieldAddress(T0, Array::element_offset(0))); // If overflow.
3869 __ Bind(&done);
3870 }
3871 if (HasParallelMove()) {
3872 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move());
3873 }
3874 }
3875
3876
3851 LocationSummary* GotoInstr::MakeLocationSummary() const { 3877 LocationSummary* GotoInstr::MakeLocationSummary() const {
3852 return new LocationSummary(0, 0, LocationSummary::kNoCall); 3878 return new LocationSummary(0, 0, LocationSummary::kNoCall);
3853 } 3879 }
3854 3880
3855 3881
3856 void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 3882 void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
3857 __ TraceSimMsg("GotoInstr"); 3883 __ TraceSimMsg("GotoInstr");
3858 if (HasParallelMove()) { 3884 if (HasParallelMove()) {
3859 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move()); 3885 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move());
3860 } 3886 }
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
4101 compiler->GenerateCall(token_pos(), 4127 compiler->GenerateCall(token_pos(),
4102 &label, 4128 &label,
4103 PcDescriptors::kOther, 4129 PcDescriptors::kOther,
4104 locs()); 4130 locs());
4105 __ Drop(2); // Discard type arguments and receiver. 4131 __ Drop(2); // Discard type arguments and receiver.
4106 } 4132 }
4107 4133
4108 } // namespace dart 4134 } // namespace dart
4109 4135
4110 #endif // defined TARGET_ARCH_MIPS 4136 #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