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

Side by Side Diff: runtime/vm/intermediate_language_arm.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: 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
« no previous file with comments | « runtime/vm/flow_graph_compiler.cc ('k') | runtime/vm/intermediate_language_arm64.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_ARM. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM.
6 #if defined(TARGET_ARCH_ARM) 6 #if defined(TARGET_ARCH_ARM)
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "vm/cpu.h" 10 #include "vm/cpu.h"
11 #include "vm/dart_entry.h" 11 #include "vm/dart_entry.h"
12 #include "vm/flow_graph.h"
12 #include "vm/flow_graph_compiler.h" 13 #include "vm/flow_graph_compiler.h"
13 #include "vm/locations.h" 14 #include "vm/locations.h"
14 #include "vm/object_store.h" 15 #include "vm/object_store.h"
15 #include "vm/parser.h" 16 #include "vm/parser.h"
16 #include "vm/simulator.h" 17 #include "vm/simulator.h"
17 #include "vm/stack_frame.h" 18 #include "vm/stack_frame.h"
18 #include "vm/stub_code.h" 19 #include "vm/stub_code.h"
19 #include "vm/symbols.h" 20 #include "vm/symbols.h"
20 21
21 #define __ compiler->assembler()-> 22 #define __ compiler->assembler()->
(...skipping 6153 matching lines...) Expand 10 before | Expand all | Expand 10 after
6175 void GraphEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 6176 void GraphEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
6176 if (!compiler->CanFallThroughTo(normal_entry())) { 6177 if (!compiler->CanFallThroughTo(normal_entry())) {
6177 __ b(compiler->GetJumpLabel(normal_entry())); 6178 __ b(compiler->GetJumpLabel(normal_entry()));
6178 } 6179 }
6179 } 6180 }
6180 6181
6181 6182
6182 void TargetEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 6183 void TargetEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
6183 __ Bind(compiler->GetJumpLabel(this)); 6184 __ Bind(compiler->GetJumpLabel(this));
6184 if (!compiler->is_optimizing()) { 6185 if (!compiler->is_optimizing()) {
6185 if (FLAG_emit_edge_counters) { 6186 if (compiler->NeedsEdgeCounter(this)) {
6186 compiler->EmitEdgeCounter(); 6187 compiler->EmitEdgeCounter();
6187 } 6188 }
6188 // Add an edge counter. 6189 // Add an edge counter.
6189 // On ARM the deoptimization descriptor points after the edge counter 6190 // On ARM the deoptimization descriptor points after the edge counter
6190 // code so that we can reuse the same pattern matching code as at call 6191 // code so that we can reuse the same pattern matching code as at call
6191 // sites, which matches backwards from the end of the pattern. 6192 // sites, which matches backwards from the end of the pattern.
6192 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt, 6193 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt,
6193 deopt_id_, 6194 deopt_id_,
6194 Scanner::kNoSourcePos); 6195 Scanner::kNoSourcePos);
6195 } 6196 }
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
6350 compiler->GenerateCall(token_pos(), 6351 compiler->GenerateCall(token_pos(),
6351 &label, 6352 &label,
6352 PcDescriptors::kOther, 6353 PcDescriptors::kOther,
6353 locs()); 6354 locs());
6354 __ Drop(ArgumentCount()); // Discard arguments. 6355 __ Drop(ArgumentCount()); // Discard arguments.
6355 } 6356 }
6356 6357
6357 } // namespace dart 6358 } // namespace dart
6358 6359
6359 #endif // defined TARGET_ARCH_ARM 6360 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler.cc ('k') | runtime/vm/intermediate_language_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698