| OLD | NEW | 
|---|
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 #include "src/compiler/common-operator.h" | 5 #include "src/compiler/common-operator.h" | 
| 6 #include "src/compiler/generic-node-inl.h" | 6 #include "src/compiler/generic-node-inl.h" | 
| 7 #include "src/compiler/graph.h" | 7 #include "src/compiler/graph.h" | 
| 8 #include "src/compiler/instruction.h" | 8 #include "src/compiler/instruction.h" | 
| 9 | 9 | 
| 10 namespace v8 { | 10 namespace v8 { | 
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 113 | 113 | 
| 114 | 114 | 
| 115 bool ParallelMove::IsRedundant() const { | 115 bool ParallelMove::IsRedundant() const { | 
| 116   for (int i = 0; i < move_operands_.length(); ++i) { | 116   for (int i = 0; i < move_operands_.length(); ++i) { | 
| 117     if (!move_operands_[i].IsRedundant()) return false; | 117     if (!move_operands_[i].IsRedundant()) return false; | 
| 118   } | 118   } | 
| 119   return true; | 119   return true; | 
| 120 } | 120 } | 
| 121 | 121 | 
| 122 | 122 | 
|  | 123 bool GapInstruction::IsRedundant() const { | 
|  | 124   for (int i = GapInstruction::FIRST_INNER_POSITION; | 
|  | 125        i <= GapInstruction::LAST_INNER_POSITION; i++) { | 
|  | 126     if (parallel_moves_[i] != NULL && !parallel_moves_[i]->IsRedundant()) | 
|  | 127       return false; | 
|  | 128   } | 
|  | 129   return true; | 
|  | 130 } | 
|  | 131 | 
|  | 132 | 
| 123 std::ostream& operator<<(std::ostream& os, | 133 std::ostream& operator<<(std::ostream& os, | 
| 124                          const PrintableParallelMove& printable) { | 134                          const PrintableParallelMove& printable) { | 
| 125   const ParallelMove& pm = *printable.parallel_move_; | 135   const ParallelMove& pm = *printable.parallel_move_; | 
| 126   bool first = true; | 136   bool first = true; | 
| 127   for (ZoneList<MoveOperands>::iterator move = pm.move_operands()->begin(); | 137   for (ZoneList<MoveOperands>::iterator move = pm.move_operands()->begin(); | 
| 128        move != pm.move_operands()->end(); ++move) { | 138        move != pm.move_operands()->end(); ++move) { | 
| 129     if (move->IsEliminated()) continue; | 139     if (move->IsEliminated()) continue; | 
| 130     if (!first) os << " "; | 140     if (!first) os << " "; | 
| 131     first = false; | 141     first = false; | 
| 132     PrintableMoveOperands pmo = {printable.register_configuration_, move}; | 142     PrintableMoveOperands pmo = {printable.register_configuration_, move}; | 
| (...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 672       os << " B" << succ_block->id(); | 682       os << " B" << succ_block->id(); | 
| 673     } | 683     } | 
| 674     os << "\n"; | 684     os << "\n"; | 
| 675   } | 685   } | 
| 676   return os; | 686   return os; | 
| 677 } | 687 } | 
| 678 | 688 | 
| 679 }  // namespace compiler | 689 }  // namespace compiler | 
| 680 }  // namespace internal | 690 }  // namespace internal | 
| 681 }  // namespace v8 | 691 }  // namespace v8 | 
| OLD | NEW | 
|---|