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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 BlockEntryInstr* block = postorder_[i]; | 157 BlockEntryInstr* block = postorder_[i]; |
158 | 158 |
159 BitVector* kill = kill_[i]; | 159 BitVector* kill = kill_[i]; |
160 BitVector* live_in = live_in_[i]; | 160 BitVector* live_in = live_in_[i]; |
161 | 161 |
162 // Iterate backwards starting at the last instruction. | 162 // Iterate backwards starting at the last instruction. |
163 for (BackwardInstructionIterator it(block); !it.Done(); it.Advance()) { | 163 for (BackwardInstructionIterator it(block); !it.Done(); it.Advance()) { |
164 Instruction* current = it.Current(); | 164 Instruction* current = it.Current(); |
165 | 165 |
166 // Initialize location summary for instruction. | 166 // Initialize location summary for instruction. |
167 current->InitializeLocationSummary(isolate()->current_zone(), | 167 current->InitializeLocationSummary(zone(), true); // opt |
168 true); // opt | |
169 LocationSummary* locs = current->locs(); | 168 LocationSummary* locs = current->locs(); |
170 #if DEBUG | 169 #if DEBUG |
171 locs->DiscoverWritableInputs(); | 170 locs->DiscoverWritableInputs(); |
172 #endif | 171 #endif |
173 | 172 |
174 // Handle definitions. | 173 // Handle definitions. |
175 Definition* current_def = current->AsDefinition(); | 174 Definition* current_def = current->AsDefinition(); |
176 if ((current_def != NULL) && current_def->HasSSATemp()) { | 175 if ((current_def != NULL) && current_def->HasSSATemp()) { |
177 kill->Add(current_def->ssa_temp_index()); | 176 kill->Add(current_def->ssa_temp_index()); |
178 live_in->Remove(current_def->ssa_temp_index()); | 177 live_in->Remove(current_def->ssa_temp_index()); |
(...skipping 2794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2973 OS::Print("-- [after ssa allocator] ir [%s] -------------\n", | 2972 OS::Print("-- [after ssa allocator] ir [%s] -------------\n", |
2974 function.ToFullyQualifiedCString()); | 2973 function.ToFullyQualifiedCString()); |
2975 FlowGraphPrinter printer(flow_graph_, true); | 2974 FlowGraphPrinter printer(flow_graph_, true); |
2976 printer.PrintBlocks(); | 2975 printer.PrintBlocks(); |
2977 OS::Print("----------------------------------------------\n"); | 2976 OS::Print("----------------------------------------------\n"); |
2978 } | 2977 } |
2979 } | 2978 } |
2980 | 2979 |
2981 | 2980 |
2982 } // namespace dart | 2981 } // namespace dart |
OLD | NEW |