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

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

Issue 1343383003: VM: Store edge counters in one per-function array. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: clean up comments, save space in IL Instruction class. Created 5 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
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 5370 matching lines...) Expand 10 before | Expand all | Expand 10 after
5381 LocationSummary* GotoInstr::MakeLocationSummary(Zone* zone, 5381 LocationSummary* GotoInstr::MakeLocationSummary(Zone* zone,
5382 bool opt) const { 5382 bool opt) const {
5383 return new(zone) LocationSummary(zone, 0, 0, LocationSummary::kNoCall); 5383 return new(zone) LocationSummary(zone, 0, 0, LocationSummary::kNoCall);
5384 } 5384 }
5385 5385
5386 5386
5387 void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 5387 void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
5388 __ Comment("GotoInstr"); 5388 __ Comment("GotoInstr");
5389 if (!compiler->is_optimizing()) { 5389 if (!compiler->is_optimizing()) {
5390 if (FLAG_emit_edge_counters) { 5390 if (FLAG_emit_edge_counters) {
5391 compiler->EmitEdgeCounter(); 5391 compiler->EmitEdgeCounter(block()->preorder_number());
5392 } 5392 }
5393 // Add a deoptimization descriptor for deoptimizing instructions that 5393 // Add a deoptimization descriptor for deoptimizing instructions that
5394 // may be inserted before this instruction. On MIPS this descriptor 5394 // may be inserted before this instruction.
5395 // points after the edge counter code so that we can reuse the same
5396 // pattern matching code as at call sites, which matches backwards from
5397 // the end of the pattern.
5398 compiler->AddCurrentDescriptor(RawPcDescriptors::kDeopt, 5395 compiler->AddCurrentDescriptor(RawPcDescriptors::kDeopt,
5399 GetDeoptId(), 5396 GetDeoptId(),
5400 Scanner::kNoSourcePos); 5397 Scanner::kNoSourcePos);
5401 } 5398 }
5402 if (HasParallelMove()) { 5399 if (HasParallelMove()) {
5403 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move()); 5400 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move());
5404 } 5401 }
5405 5402
5406 // We can fall through if the successor is the next block in the list. 5403 // We can fall through if the successor is the next block in the list.
5407 // Otherwise, we need a jump. 5404 // Otherwise, we need a jump.
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
5603 1, 5600 1,
5604 locs()); 5601 locs());
5605 __ lw(result, Address(SP, 1 * kWordSize)); 5602 __ lw(result, Address(SP, 1 * kWordSize));
5606 __ addiu(SP, SP, Immediate(2 * kWordSize)); 5603 __ addiu(SP, SP, Immediate(2 * kWordSize));
5607 } 5604 }
5608 5605
5609 5606
5610 } // namespace dart 5607 } // namespace dart
5611 5608
5612 #endif // defined TARGET_ARCH_MIPS 5609 #endif // defined TARGET_ARCH_MIPS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698