| 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_optimizer.h" | 5 #include "vm/flow_graph_optimizer.h" |
| 6 | 6 |
| 7 #include "vm/bit_vector.h" | 7 #include "vm/bit_vector.h" |
| 8 #include "vm/cha.h" | 8 #include "vm/cha.h" |
| 9 #include "vm/cpu.h" | 9 #include "vm/cpu.h" |
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 7220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7231 ASSERT(!is_load && is_store); | 7231 ASSERT(!is_load && is_store); |
| 7232 if (place.IsFinalField()) { | 7232 if (place.IsFinalField()) { |
| 7233 // Final field do not participate in dead store elimination. | 7233 // Final field do not participate in dead store elimination. |
| 7234 continue; | 7234 continue; |
| 7235 } | 7235 } |
| 7236 // Eliminate a downward exposed store if the corresponding place is not | 7236 // Eliminate a downward exposed store if the corresponding place is not |
| 7237 // in live-out. | 7237 // in live-out. |
| 7238 if (!live_out->Contains(instr->place_id()) && | 7238 if (!live_out->Contains(instr->place_id()) && |
| 7239 CanEliminateStore(instr)) { | 7239 CanEliminateStore(instr)) { |
| 7240 if (FLAG_trace_optimization) { | 7240 if (FLAG_trace_optimization) { |
| 7241 OS::Print("Removing dead store to place %"Pd" in block B%"Pd"\n", | 7241 OS::Print("Removing dead store to place %" Pd " block B%" Pd "\n", |
| 7242 instr->place_id(), block->block_id()); | 7242 instr->place_id(), block->block_id()); |
| 7243 } | 7243 } |
| 7244 instr->RemoveFromGraph(/* ignored */ false); | 7244 instr->RemoveFromGraph(/* ignored */ false); |
| 7245 } | 7245 } |
| 7246 } | 7246 } |
| 7247 } | 7247 } |
| 7248 } | 7248 } |
| 7249 | 7249 |
| 7250 FlowGraph* graph_; | 7250 FlowGraph* graph_; |
| 7251 DirectChainedHashMap<PointerKeyValueTrait<Place> >* map_; | 7251 DirectChainedHashMap<PointerKeyValueTrait<Place> >* map_; |
| (...skipping 2266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9518 } | 9518 } |
| 9519 | 9519 |
| 9520 // Insert materializations at environment uses. | 9520 // Insert materializations at environment uses. |
| 9521 for (intptr_t i = 0; i < exits.length(); i++) { | 9521 for (intptr_t i = 0; i < exits.length(); i++) { |
| 9522 CreateMaterializationAt(exits[i], alloc, alloc->cls(), *slots); | 9522 CreateMaterializationAt(exits[i], alloc, alloc->cls(), *slots); |
| 9523 } | 9523 } |
| 9524 } | 9524 } |
| 9525 | 9525 |
| 9526 | 9526 |
| 9527 } // namespace dart | 9527 } // namespace dart |
| OLD | NEW |