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

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: Created 5 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
« no previous file with comments | « runtime/vm/intermediate_language_arm64.cc ('k') | runtime/vm/intermediate_language_mips.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_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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
6870 __ Drop(1); 6867 __ Drop(1);
6871 __ popl(result); 6868 __ popl(result);
6872 } 6869 }
6873 6870
6874 6871
6875 } // namespace dart 6872 } // namespace dart
6876 6873
6877 #undef __ 6874 #undef __
6878 6875
6879 #endif // defined TARGET_ARCH_IA32 6876 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_arm64.cc ('k') | runtime/vm/intermediate_language_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698