| 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 9067 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9078 | 9078 |
| 9079 // Replace the false target entry with the new join entry. We will | 9079 // Replace the false target entry with the new join entry. We will |
| 9080 // recompute the dominators after this pass. | 9080 // recompute the dominators after this pass. |
| 9081 join->LinkTo(next); | 9081 join->LinkTo(next); |
| 9082 branch->UnuseAllInputs(); | 9082 branch->UnuseAllInputs(); |
| 9083 } | 9083 } |
| 9084 } | 9084 } |
| 9085 } | 9085 } |
| 9086 | 9086 |
| 9087 graph_->DiscoverBlocks(); | 9087 graph_->DiscoverBlocks(); |
| 9088 graph_->MergeBlocks(); |
| 9088 GrowableArray<BitVector*> dominance_frontier; | 9089 GrowableArray<BitVector*> dominance_frontier; |
| 9089 graph_->ComputeDominators(&dominance_frontier); | 9090 graph_->ComputeDominators(&dominance_frontier); |
| 9090 | 9091 |
| 9091 if (FLAG_trace_constant_propagation) { | 9092 if (FLAG_trace_constant_propagation) { |
| 9092 OS::Print("\n==== After constant propagation ====\n"); | 9093 OS::Print("\n==== After constant propagation ====\n"); |
| 9093 FlowGraphPrinter printer(*graph_); | 9094 FlowGraphPrinter printer(*graph_); |
| 9094 printer.PrintBlocks(); | 9095 printer.PrintBlocks(); |
| 9095 } | 9096 } |
| 9096 } | 9097 } |
| 9097 | 9098 |
| (...skipping 963 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10061 | 10062 |
| 10062 // Insert materializations at environment uses. | 10063 // Insert materializations at environment uses. |
| 10063 for (intptr_t i = 0; i < exits_collector_.exits().length(); i++) { | 10064 for (intptr_t i = 0; i < exits_collector_.exits().length(); i++) { |
| 10064 CreateMaterializationAt( | 10065 CreateMaterializationAt( |
| 10065 exits_collector_.exits()[i], alloc, *slots); | 10066 exits_collector_.exits()[i], alloc, *slots); |
| 10066 } | 10067 } |
| 10067 } | 10068 } |
| 10068 | 10069 |
| 10069 | 10070 |
| 10070 } // namespace dart | 10071 } // namespace dart |
| OLD | NEW |