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

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

Issue 12335102: Compile and simulate first dart function on arm generated from ast. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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/flow_graph_allocator.h" 5 #include "vm/flow_graph_allocator.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 #include "vm/il_printer.h" 9 #include "vm/il_printer.h"
10 #include "vm/flow_graph.h" 10 #include "vm/flow_graph.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 kill_(block_order_.length()), 70 kill_(block_order_.length()),
71 live_in_(block_order_.length()), 71 live_in_(block_order_.length()),
72 vreg_count_(flow_graph.max_virtual_register_number()), 72 vreg_count_(flow_graph.max_virtual_register_number()),
73 live_ranges_(flow_graph.max_virtual_register_number()), 73 live_ranges_(flow_graph.max_virtual_register_number()),
74 cpu_regs_(), 74 cpu_regs_(),
75 fpu_regs_(), 75 fpu_regs_(),
76 blocked_cpu_registers_(), 76 blocked_cpu_registers_(),
77 blocked_fpu_registers_(), 77 blocked_fpu_registers_(),
78 cpu_spill_slot_count_(0) { 78 cpu_spill_slot_count_(0) {
79 for (intptr_t i = 0; i < vreg_count_; i++) live_ranges_.Add(NULL); 79 for (intptr_t i = 0; i < vreg_count_; i++) live_ranges_.Add(NULL);
80 80
srdjan 2013/02/26 23:23:09 You don't need to set to false, blocked_cpu_regist
regis 2013/02/27 00:19:26 Where does this happen? Does blocked_cpu_registers
srdjan 2013/02/27 00:27:24 Yes.
81 // Mark all available registers free.
82 for (intptr_t i = 0; i < kFirstFreeCpuRegister; i++) {
83 blocked_cpu_registers_[i] = true;
84 }
85 for (intptr_t i = kFirstFreeCpuRegister; i <= kLastFreeCpuRegister; i++) {
86 blocked_cpu_registers_[i] = false;
87 }
88 for (intptr_t i = kLastFreeCpuRegister + 1; i < kNumberOfCpuRegisters; i++) {
89 blocked_cpu_registers_[i] = true;
90 }
81 blocked_cpu_registers_[CTX] = true; 91 blocked_cpu_registers_[CTX] = true;
82 if (TMP != kNoRegister) { 92 if (TMP != kNoRegister) {
83 blocked_cpu_registers_[TMP] = true; 93 blocked_cpu_registers_[TMP] = true;
84 } 94 }
95 if (PP != kNoRegister) {
96 blocked_cpu_registers_[PP] = true;
97 }
85 blocked_cpu_registers_[SPREG] = true; 98 blocked_cpu_registers_[SPREG] = true;
86 blocked_cpu_registers_[FPREG] = true; 99 blocked_cpu_registers_[FPREG] = true;
87 100
88 // FpuTMP is used as scratch by optimized code and parallel move resolver. 101 // FpuTMP is used as scratch by optimized code and parallel move resolver.
89 blocked_fpu_registers_[FpuTMP] = true; 102 blocked_fpu_registers_[FpuTMP] = true;
90 } 103 }
91 104
92 105
93 // Remove environments from the instructions which can't deoptimize. 106 // Remove environments from the instructions which can't deoptimize.
94 // Replace dead phis uses with null values in environments. 107 // Replace dead phis uses with null values in environments.
(...skipping 2416 matching lines...) Expand 10 before | Expand all | Expand 10 after
2511 OS::Print("-- [after ssa allocator] ir [%s] -------------\n", 2524 OS::Print("-- [after ssa allocator] ir [%s] -------------\n",
2512 function.ToFullyQualifiedCString()); 2525 function.ToFullyQualifiedCString());
2513 FlowGraphPrinter printer(flow_graph_, true); 2526 FlowGraphPrinter printer(flow_graph_, true);
2514 printer.PrintBlocks(); 2527 printer.PrintBlocks();
2515 OS::Print("----------------------------------------------\n"); 2528 OS::Print("----------------------------------------------\n");
2516 } 2529 }
2517 } 2530 }
2518 2531
2519 2532
2520 } // namespace dart 2533 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698