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

Side by Side Diff: runtime/vm/intermediate_language_ia32.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_IA32. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32.
6 #if defined(TARGET_ARCH_IA32) 6 #if defined(TARGET_ARCH_IA32)
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 6524 matching lines...) Expand 10 before | Expand all | Expand 10 after
6535 6535
6536 LocationSummary* GotoInstr::MakeLocationSummary(Zone* zone, 6536 LocationSummary* GotoInstr::MakeLocationSummary(Zone* zone,
6537 bool opt) const { 6537 bool opt) const {
6538 return new(zone) LocationSummary(zone, 0, 0, LocationSummary::kNoCall); 6538 return new(zone) LocationSummary(zone, 0, 0, LocationSummary::kNoCall);
6539 } 6539 }
6540 6540
6541 6541
6542 void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 6542 void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
6543 if (!compiler->is_optimizing()) { 6543 if (!compiler->is_optimizing()) {
6544 if (FLAG_emit_edge_counters) { 6544 if (FLAG_emit_edge_counters) {
6545 compiler->EmitEdgeCounter(); 6545 compiler->EmitEdgeCounter(block()->preorder_number());
6546 } 6546 }
6547 // Add a deoptimization descriptor for deoptimizing instructions that 6547 // Add a deoptimization descriptor for deoptimizing instructions that
6548 // may be inserted before this instruction. This descriptor points 6548 // may be inserted before this instruction.
6549 // after the edge counter for uniformity with ARM and MIPS, where we can
6550 // reuse pattern matching that matches backwards from the end of the
6551 // pattern.
6552 compiler->AddCurrentDescriptor(RawPcDescriptors::kDeopt, 6549 compiler->AddCurrentDescriptor(RawPcDescriptors::kDeopt,
6553 GetDeoptId(), 6550 GetDeoptId(),
6554 Scanner::kNoSourcePos); 6551 Scanner::kNoSourcePos);
6555 } 6552 }
6556 if (HasParallelMove()) { 6553 if (HasParallelMove()) {
6557 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move()); 6554 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move());
6558 } 6555 }
6559 6556
6560 // We can fall through if the successor is the next block in the list. 6557 // We can fall through if the successor is the next block in the list.
6561 // Otherwise, we need a jump. 6558 // Otherwise, we need a jump.
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
6868 __ Drop(1); 6865 __ Drop(1);
6869 __ popl(result); 6866 __ popl(result);
6870 } 6867 }
6871 6868
6872 6869
6873 } // namespace dart 6870 } // namespace dart
6874 6871
6875 #undef __ 6872 #undef __
6876 6873
6877 #endif // defined TARGET_ARCH_IA32 6874 #endif // defined TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698