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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 Instruction* current = it.Current(); | 115 Instruction* current = it.Current(); |
116 | 116 |
117 // Handle definitions. | 117 // Handle definitions. |
118 Definition* current_def = current->AsDefinition(); | 118 Definition* current_def = current->AsDefinition(); |
119 if ((current_def != NULL) && current_def->HasSSATemp()) { | 119 if ((current_def != NULL) && current_def->HasSSATemp()) { |
120 kill->Add(current_def->ssa_temp_index()); | 120 kill->Add(current_def->ssa_temp_index()); |
121 live_in->Remove(current_def->ssa_temp_index()); | 121 live_in->Remove(current_def->ssa_temp_index()); |
122 } | 122 } |
123 | 123 |
124 // Handle uses. | 124 // Handle uses. |
| 125 current->InitializeLocationSummary(true); // Optimizing. |
125 LocationSummary* locs = current->locs(); | 126 LocationSummary* locs = current->locs(); |
126 ASSERT(locs->input_count() == current->InputCount()); | 127 ASSERT(locs->input_count() == current->InputCount()); |
127 for (intptr_t j = 0; j < current->InputCount(); j++) { | 128 for (intptr_t j = 0; j < current->InputCount(); j++) { |
128 Value* input = current->InputAt(j); | 129 Value* input = current->InputAt(j); |
129 const intptr_t use = input->definition()->ssa_temp_index(); | 130 const intptr_t use = input->definition()->ssa_temp_index(); |
130 | 131 |
131 ASSERT(!locs->in(j).IsConstant() || input->BindsToConstant()); | 132 ASSERT(!locs->in(j).IsConstant() || input->BindsToConstant()); |
132 if (locs->in(j).IsConstant()) continue; | 133 if (locs->in(j).IsConstant()) continue; |
133 | 134 |
134 live_in->Add(use); | 135 live_in->Add(use); |
(...skipping 2466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2601 OS::Print("-- [after ssa allocator] ir [%s] -------------\n", | 2602 OS::Print("-- [after ssa allocator] ir [%s] -------------\n", |
2602 function.ToFullyQualifiedCString()); | 2603 function.ToFullyQualifiedCString()); |
2603 FlowGraphPrinter printer(flow_graph_, true); | 2604 FlowGraphPrinter printer(flow_graph_, true); |
2604 printer.PrintBlocks(); | 2605 printer.PrintBlocks(); |
2605 OS::Print("----------------------------------------------\n"); | 2606 OS::Print("----------------------------------------------\n"); |
2606 } | 2607 } |
2607 } | 2608 } |
2608 | 2609 |
2609 | 2610 |
2610 } // namespace dart | 2611 } // namespace dart |
OLD | NEW |