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

Side by Side Diff: runtime/vm/intermediate_language_mips.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) 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"
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 4470 matching lines...) Expand 10 before | Expand all | Expand 10 after
4491 void GraphEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 4492 void GraphEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
4492 if (!compiler->CanFallThroughTo(normal_entry())) { 4493 if (!compiler->CanFallThroughTo(normal_entry())) {
4493 __ b(compiler->GetJumpLabel(normal_entry())); 4494 __ b(compiler->GetJumpLabel(normal_entry()));
4494 } 4495 }
4495 } 4496 }
4496 4497
4497 4498
4498 void TargetEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 4499 void TargetEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
4499 __ Bind(compiler->GetJumpLabel(this)); 4500 __ Bind(compiler->GetJumpLabel(this));
4500 if (!compiler->is_optimizing()) { 4501 if (!compiler->is_optimizing()) {
4501 if (FLAG_emit_edge_counters) { 4502 if (FLAG_emit_edge_counters &&
4503 (!last_instruction()->IsGoto() ||
Cutch 2014/06/06 14:56:12 Maybe add a comment here: // Emit an edge counter
Florian Schneider 2014/06/10 08:56:39 Done.
4504 (this == compiler->flow_graph().graph_entry()->normal_entry()))) {
4502 compiler->EmitEdgeCounter(); 4505 compiler->EmitEdgeCounter();
4503 } 4506 }
4504 // On MIPS the deoptimization descriptor points after the edge counter 4507 // On MIPS the deoptimization descriptor points after the edge counter
4505 // code so that we can reuse the same pattern matching code as at call 4508 // code so that we can reuse the same pattern matching code as at call
4506 // sites, which matches backwards from the end of the pattern. 4509 // sites, which matches backwards from the end of the pattern.
4507 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt, 4510 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt,
4508 deopt_id_, 4511 deopt_id_,
4509 Scanner::kNoSourcePos); 4512 Scanner::kNoSourcePos);
4510 } 4513 }
4511 if (HasParallelMove()) { 4514 if (HasParallelMove()) {
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
4678 compiler->GenerateCall(token_pos(), 4681 compiler->GenerateCall(token_pos(),
4679 &label, 4682 &label,
4680 PcDescriptors::kOther, 4683 PcDescriptors::kOther,
4681 locs()); 4684 locs());
4682 __ Drop(ArgumentCount()); // Discard arguments. 4685 __ Drop(ArgumentCount()); // Discard arguments.
4683 } 4686 }
4684 4687
4685 } // namespace dart 4688 } // namespace dart
4686 4689
4687 #endif // defined TARGET_ARCH_MIPS 4690 #endif // defined TARGET_ARCH_MIPS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698