| 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/compiler.h" | 9 #include "vm/compiler.h" |
| 10 #include "vm/cpu.h" | 10 #include "vm/cpu.h" |
| (...skipping 4818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4829 // Step 1. Collect all instructions that potentially benefit from widening of | 4829 // Step 1. Collect all instructions that potentially benefit from widening of |
| 4830 // their operands (or their result) into int32 range. | 4830 // their operands (or their result) into int32 range. |
| 4831 for (BlockIterator block_it = flow_graph_->reverse_postorder_iterator(); | 4831 for (BlockIterator block_it = flow_graph_->reverse_postorder_iterator(); |
| 4832 !block_it.Done(); | 4832 !block_it.Done(); |
| 4833 block_it.Advance()) { | 4833 block_it.Advance()) { |
| 4834 for (ForwardInstructionIterator instr_it(block_it.Current()); | 4834 for (ForwardInstructionIterator instr_it(block_it.Current()); |
| 4835 !instr_it.Done(); | 4835 !instr_it.Done(); |
| 4836 instr_it.Advance()) { | 4836 instr_it.Advance()) { |
| 4837 BinarySmiOpInstr* smi_op = instr_it.Current()->AsBinarySmiOp(); | 4837 BinarySmiOpInstr* smi_op = instr_it.Current()->AsBinarySmiOp(); |
| 4838 if ((smi_op != NULL) && | 4838 if ((smi_op != NULL) && |
| 4839 smi_op->HasSSATemp() && |
| 4839 BenefitsFromWidening(smi_op) && | 4840 BenefitsFromWidening(smi_op) && |
| 4840 CanBeWidened(smi_op)) { | 4841 CanBeWidened(smi_op)) { |
| 4841 candidates.Add(smi_op); | 4842 candidates.Add(smi_op); |
| 4842 } | 4843 } |
| 4843 } | 4844 } |
| 4844 } | 4845 } |
| 4845 | 4846 |
| 4846 if (candidates.is_empty()) { | 4847 if (candidates.is_empty()) { |
| 4847 return; | 4848 return; |
| 4848 } | 4849 } |
| (...skipping 3975 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8824 | 8825 |
| 8825 // Insert materializations at environment uses. | 8826 // Insert materializations at environment uses. |
| 8826 for (intptr_t i = 0; i < exits_collector_.exits().length(); i++) { | 8827 for (intptr_t i = 0; i < exits_collector_.exits().length(); i++) { |
| 8827 CreateMaterializationAt( | 8828 CreateMaterializationAt( |
| 8828 exits_collector_.exits()[i], alloc, *slots); | 8829 exits_collector_.exits()[i], alloc, *slots); |
| 8829 } | 8830 } |
| 8830 } | 8831 } |
| 8831 | 8832 |
| 8832 | 8833 |
| 8833 } // namespace dart | 8834 } // namespace dart |
| OLD | NEW |