| 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/intermediate_language.h" | 5 #include "vm/intermediate_language.h" |
| 6 | 6 |
| 7 #include "vm/bigint_operations.h" | 7 #include "vm/bigint_operations.h" |
| 8 #include "vm/bit_vector.h" | 8 #include "vm/bit_vector.h" |
| 9 #include "vm/dart_entry.h" | 9 #include "vm/dart_entry.h" |
| 10 #include "vm/flow_graph_allocator.h" | 10 #include "vm/flow_graph_allocator.h" |
| (...skipping 1631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1642 | 1642 |
| 1643 // Replace the comparison if the replacement is used at this branch, | 1643 // Replace the comparison if the replacement is used at this branch, |
| 1644 // and has exactly one use. | 1644 // and has exactly one use. |
| 1645 Value* use = comp->input_use_list(); | 1645 Value* use = comp->input_use_list(); |
| 1646 if ((use->instruction() == this) && comp->HasOnlyUse(use)) { | 1646 if ((use->instruction() == this) && comp->HasOnlyUse(use)) { |
| 1647 if (negated) { | 1647 if (negated) { |
| 1648 comp->NegateComparison(); | 1648 comp->NegateComparison(); |
| 1649 } | 1649 } |
| 1650 RemoveEnvironment(); | 1650 RemoveEnvironment(); |
| 1651 flow_graph->CopyDeoptTarget(this, comp); | 1651 flow_graph->CopyDeoptTarget(this, comp); |
| 1652 // Unlink environment from the comparison since it is copied to the |
| 1653 // branch instruction. |
| 1654 comp->RemoveEnvironment(); |
| 1652 | 1655 |
| 1653 comp->RemoveFromGraph(); | 1656 comp->RemoveFromGraph(); |
| 1654 SetComparison(comp); | 1657 SetComparison(comp); |
| 1655 if (FLAG_trace_optimization) { | 1658 if (FLAG_trace_optimization) { |
| 1656 OS::Print("Merging comparison v%" Pd "\n", comp->ssa_temp_index()); | 1659 OS::Print("Merging comparison v%" Pd "\n", comp->ssa_temp_index()); |
| 1657 } | 1660 } |
| 1658 // Clear the comparison's temp index and ssa temp index since the | 1661 // Clear the comparison's temp index and ssa temp index since the |
| 1659 // value of the comparison is not used outside the branch anymore. | 1662 // value of the comparison is not used outside the branch anymore. |
| 1660 ASSERT(comp->input_use_list() == NULL); | 1663 ASSERT(comp->input_use_list() == NULL); |
| 1661 comp->ClearSSATempIndex(); | 1664 comp->ClearSSATempIndex(); |
| (...skipping 1212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2874 return kCosRuntimeEntry; | 2877 return kCosRuntimeEntry; |
| 2875 default: | 2878 default: |
| 2876 UNREACHABLE(); | 2879 UNREACHABLE(); |
| 2877 } | 2880 } |
| 2878 return kSinRuntimeEntry; | 2881 return kSinRuntimeEntry; |
| 2879 } | 2882 } |
| 2880 | 2883 |
| 2881 #undef __ | 2884 #undef __ |
| 2882 | 2885 |
| 2883 } // namespace dart | 2886 } // namespace dart |
| OLD | NEW |