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

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
« no previous file with comments | « runtime/vm/disassembler_arm.cc ('k') | runtime/vm/flow_graph_compiler.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/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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
81 // All registers are marked as "not blocked" (array initialized to false).
82 // Mark the unavailable ones as "blocked" (true).
83 for (intptr_t i = 0; i < kFirstFreeCpuRegister; i++) {
84 blocked_cpu_registers_[i] = true;
85 }
86 for (intptr_t i = kLastFreeCpuRegister + 1; i < kNumberOfCpuRegisters; i++) {
87 blocked_cpu_registers_[i] = true;
88 }
81 blocked_cpu_registers_[CTX] = true; 89 blocked_cpu_registers_[CTX] = true;
82 if (TMP != kNoRegister) { 90 if (TMP != kNoRegister) {
83 blocked_cpu_registers_[TMP] = true; 91 blocked_cpu_registers_[TMP] = true;
84 } 92 }
93 if (PP != kNoRegister) {
94 blocked_cpu_registers_[PP] = true;
95 }
85 blocked_cpu_registers_[SPREG] = true; 96 blocked_cpu_registers_[SPREG] = true;
86 blocked_cpu_registers_[FPREG] = true; 97 blocked_cpu_registers_[FPREG] = true;
87 98
88 // FpuTMP is used as scratch by optimized code and parallel move resolver. 99 // FpuTMP is used as scratch by optimized code and parallel move resolver.
89 blocked_fpu_registers_[FpuTMP] = true; 100 blocked_fpu_registers_[FpuTMP] = true;
90 } 101 }
91 102
92 103
93 // Remove environments from the instructions which can't deoptimize. 104 // Remove environments from the instructions which can't deoptimize.
94 // Replace dead phis uses with null values in environments. 105 // 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", 2522 OS::Print("-- [after ssa allocator] ir [%s] -------------\n",
2512 function.ToFullyQualifiedCString()); 2523 function.ToFullyQualifiedCString());
2513 FlowGraphPrinter printer(flow_graph_, true); 2524 FlowGraphPrinter printer(flow_graph_, true);
2514 printer.PrintBlocks(); 2525 printer.PrintBlocks();
2515 OS::Print("----------------------------------------------\n"); 2526 OS::Print("----------------------------------------------\n");
2516 } 2527 }
2517 } 2528 }
2518 2529
2519 2530
2520 } // namespace dart 2531 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/disassembler_arm.cc ('k') | runtime/vm/flow_graph_compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698