| 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/flow_graph_builder.h" | 9 #include "vm/flow_graph_builder.h" |
| 10 #include "vm/flow_graph_compiler.h" | 10 #include "vm/flow_graph_compiler.h" |
| (...skipping 6281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6292 pred->set_block_id(block->block_id()); | 6292 pred->set_block_id(block->block_id()); |
| 6293 | 6293 |
| 6294 // If v1 and v2 were defined inside eliminated blocks pred1/pred2 | 6294 // If v1 and v2 were defined inside eliminated blocks pred1/pred2 |
| 6295 // move them out to the place before inserted IfThenElse instruction. | 6295 // move them out to the place before inserted IfThenElse instruction. |
| 6296 EliminateTrivialBlock(pred1, v1->definition(), if_then_else); | 6296 EliminateTrivialBlock(pred1, v1->definition(), if_then_else); |
| 6297 EliminateTrivialBlock(pred2, v2->definition(), if_then_else); | 6297 EliminateTrivialBlock(pred2, v2->definition(), if_then_else); |
| 6298 | 6298 |
| 6299 // Update use lists to reflect changes in the graph. | 6299 // Update use lists to reflect changes in the graph. |
| 6300 phi->UnuseAllInputs(); | 6300 phi->UnuseAllInputs(); |
| 6301 branch->UnuseAllInputs(); | 6301 branch->UnuseAllInputs(); |
| 6302 block->UnuseAllInputs(); |
| 6302 | 6303 |
| 6303 // The graph has changed. Recompute dominators and block orders after | 6304 // The graph has changed. Recompute dominators and block orders after |
| 6304 // this pass is finished. | 6305 // this pass is finished. |
| 6305 changed = true; | 6306 changed = true; |
| 6306 } | 6307 } |
| 6307 } | 6308 } |
| 6308 } | 6309 } |
| 6309 } | 6310 } |
| 6310 | 6311 |
| 6311 if (changed) { | 6312 if (changed) { |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6547 | 6548 |
| 6548 // Insert materializations at environment uses. | 6549 // Insert materializations at environment uses. |
| 6549 const Class& cls = Class::Handle(alloc->constructor().Owner()); | 6550 const Class& cls = Class::Handle(alloc->constructor().Owner()); |
| 6550 for (intptr_t i = 0; i < exits.length(); i++) { | 6551 for (intptr_t i = 0; i < exits.length(); i++) { |
| 6551 CreateMaterializationAt(exits[i], alloc, cls, *fields); | 6552 CreateMaterializationAt(exits[i], alloc, cls, *fields); |
| 6552 } | 6553 } |
| 6553 } | 6554 } |
| 6554 | 6555 |
| 6555 | 6556 |
| 6556 } // namespace dart | 6557 } // namespace dart |
| OLD | NEW |