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

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

Issue 311993007: VM: Reduce the number of edge counters in generated code. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: added other platforms Created 6 years, 6 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
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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_ARM64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64.
6 #if defined(TARGET_ARCH_ARM64) 6 #if defined(TARGET_ARCH_ARM64)
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"
11 #include "vm/flow_graph.h"
11 #include "vm/flow_graph_compiler.h" 12 #include "vm/flow_graph_compiler.h"
12 #include "vm/locations.h" 13 #include "vm/locations.h"
13 #include "vm/object_store.h" 14 #include "vm/object_store.h"
14 #include "vm/parser.h" 15 #include "vm/parser.h"
15 #include "vm/simulator.h" 16 #include "vm/simulator.h"
16 #include "vm/stack_frame.h" 17 #include "vm/stack_frame.h"
17 #include "vm/stub_code.h" 18 #include "vm/stub_code.h"
18 #include "vm/symbols.h" 19 #include "vm/symbols.h"
19 20
20 #define __ compiler->assembler()-> 21 #define __ compiler->assembler()->
(...skipping 5121 matching lines...) Expand 10 before | Expand all | Expand 10 after
5142 void GraphEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 5143 void GraphEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
5143 if (!compiler->CanFallThroughTo(normal_entry())) { 5144 if (!compiler->CanFallThroughTo(normal_entry())) {
5144 __ b(compiler->GetJumpLabel(normal_entry())); 5145 __ b(compiler->GetJumpLabel(normal_entry()));
5145 } 5146 }
5146 } 5147 }
5147 5148
5148 5149
5149 void TargetEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 5150 void TargetEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
5150 __ Bind(compiler->GetJumpLabel(this)); 5151 __ Bind(compiler->GetJumpLabel(this));
5151 if (!compiler->is_optimizing()) { 5152 if (!compiler->is_optimizing()) {
5152 if (FLAG_emit_edge_counters) { 5153 if (FLAG_emit_edge_counters &&
5154 (!last_instruction()->IsGoto() ||
5155 (this == compiler->flow_graph().graph_entry()->normal_entry()))) {
5153 compiler->EmitEdgeCounter(); 5156 compiler->EmitEdgeCounter();
5154 } 5157 }
5155 // Add an edge counter. 5158 // Add an edge counter.
5156 // On ARM64 the deoptimization descriptor points after the edge counter 5159 // On ARM64 the deoptimization descriptor points after the edge counter
5157 // code so that we can reuse the same pattern matching code as at call 5160 // code so that we can reuse the same pattern matching code as at call
5158 // sites, which matches backwards from the end of the pattern. 5161 // sites, which matches backwards from the end of the pattern.
5159 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt, 5162 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt,
5160 deopt_id_, 5163 deopt_id_,
5161 Scanner::kNoSourcePos); 5164 Scanner::kNoSourcePos);
5162 } 5165 }
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
5325 compiler->GenerateCall(token_pos(), 5328 compiler->GenerateCall(token_pos(),
5326 &label, 5329 &label,
5327 PcDescriptors::kOther, 5330 PcDescriptors::kOther,
5328 locs()); 5331 locs());
5329 __ Drop(ArgumentCount()); // Discard arguments. 5332 __ Drop(ArgumentCount()); // Discard arguments.
5330 } 5333 }
5331 5334
5332 } // namespace dart 5335 } // namespace dart
5333 5336
5334 #endif // defined TARGET_ARCH_ARM64 5337 #endif // defined TARGET_ARCH_ARM64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698