| 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 3685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3696 } | 3696 } |
| 3697 | 3697 |
| 3698 | 3698 |
| 3699 void ConstantPropagator::VisitTargetEntry(TargetEntryInstr* block) { | 3699 void ConstantPropagator::VisitTargetEntry(TargetEntryInstr* block) { |
| 3700 for (ForwardInstructionIterator it(block); !it.Done(); it.Advance()) { | 3700 for (ForwardInstructionIterator it(block); !it.Done(); it.Advance()) { |
| 3701 it.Current()->Accept(this); | 3701 it.Current()->Accept(this); |
| 3702 } | 3702 } |
| 3703 } | 3703 } |
| 3704 | 3704 |
| 3705 | 3705 |
| 3706 void ConstantPropagator::VisitCatchBlockEntry(CatchBlockEntryInstr* block) { |
| 3707 for (ForwardInstructionIterator it(block); !it.Done(); it.Advance()) { |
| 3708 it.Current()->Accept(this); |
| 3709 } |
| 3710 } |
| 3711 |
| 3712 |
| 3706 void ConstantPropagator::VisitParallelMove(ParallelMoveInstr* instr) { | 3713 void ConstantPropagator::VisitParallelMove(ParallelMoveInstr* instr) { |
| 3707 // Parallel moves have not yet been inserted in the graph. | 3714 // Parallel moves have not yet been inserted in the graph. |
| 3708 UNREACHABLE(); | 3715 UNREACHABLE(); |
| 3709 } | 3716 } |
| 3710 | 3717 |
| 3711 | 3718 |
| 3712 // -------------------------------------------------------------------------- | 3719 // -------------------------------------------------------------------------- |
| 3713 // Analysis of control instructions. Unconditional successors are | 3720 // Analysis of control instructions. Unconditional successors are |
| 3714 // reachable. Conditional successors are reachable depending on the | 3721 // reachable. Conditional successors are reachable depending on the |
| 3715 // constant value of the condition. | 3722 // constant value of the condition. |
| (...skipping 943 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4659 if (changed) { | 4666 if (changed) { |
| 4660 // We may have changed the block order and the dominator tree. | 4667 // We may have changed the block order and the dominator tree. |
| 4661 flow_graph->DiscoverBlocks(); | 4668 flow_graph->DiscoverBlocks(); |
| 4662 GrowableArray<BitVector*> dominance_frontier; | 4669 GrowableArray<BitVector*> dominance_frontier; |
| 4663 flow_graph->ComputeDominators(&dominance_frontier); | 4670 flow_graph->ComputeDominators(&dominance_frontier); |
| 4664 } | 4671 } |
| 4665 } | 4672 } |
| 4666 | 4673 |
| 4667 | 4674 |
| 4668 } // namespace dart | 4675 } // namespace dart |
| OLD | NEW |