OLD | NEW |
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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 } | 108 } |
109 | 109 |
110 // FpuTMP is used as scratch by optimized code and parallel move resolver. | 110 // FpuTMP is used as scratch by optimized code and parallel move resolver. |
111 blocked_fpu_registers_[FpuTMP] = true; | 111 blocked_fpu_registers_[FpuTMP] = true; |
112 | 112 |
113 // Block additional registers needed preserved when generating intrinsics. | 113 // Block additional registers needed preserved when generating intrinsics. |
114 // TODO(fschneider): Handle saving and restoring these registers when | 114 // TODO(fschneider): Handle saving and restoring these registers when |
115 // generating intrinsic code. | 115 // generating intrinsic code. |
116 if (intrinsic_mode) { | 116 if (intrinsic_mode) { |
117 blocked_cpu_registers_[ARGS_DESC_REG] = true; | 117 blocked_cpu_registers_[ARGS_DESC_REG] = true; |
| 118 #if !defined(TARGET_ARCH_IA32) |
| 119 // Need to preserve CODE_REG to be able to store the PC marker |
| 120 // and load the pool pointer. |
| 121 blocked_cpu_registers_[CODE_REG] = true; |
| 122 #endif |
118 } | 123 } |
119 } | 124 } |
120 | 125 |
121 | 126 |
122 static void DeepLiveness(MaterializeObjectInstr* mat, BitVector* live_in) { | 127 static void DeepLiveness(MaterializeObjectInstr* mat, BitVector* live_in) { |
123 if (mat->was_visited_for_liveness()) { | 128 if (mat->was_visited_for_liveness()) { |
124 return; | 129 return; |
125 } | 130 } |
126 mat->mark_visited_for_liveness(); | 131 mat->mark_visited_for_liveness(); |
127 | 132 |
(...skipping 2878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3006 THR_Print("-- [after ssa allocator] ir [%s] -------------\n", | 3011 THR_Print("-- [after ssa allocator] ir [%s] -------------\n", |
3007 function.ToFullyQualifiedCString()); | 3012 function.ToFullyQualifiedCString()); |
3008 FlowGraphPrinter printer(flow_graph_, true); | 3013 FlowGraphPrinter printer(flow_graph_, true); |
3009 printer.PrintBlocks(); | 3014 printer.PrintBlocks(); |
3010 THR_Print("----------------------------------------------\n"); | 3015 THR_Print("----------------------------------------------\n"); |
3011 } | 3016 } |
3012 } | 3017 } |
3013 | 3018 |
3014 | 3019 |
3015 } // namespace dart | 3020 } // namespace dart |
OLD | NEW |