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 #ifndef V8_COMPILER_MOVE_OPTIMIZER_ | 5 #ifndef V8_COMPILER_MOVE_OPTIMIZER_ |
6 #define V8_COMPILER_MOVE_OPTIMIZER_ | 6 #define V8_COMPILER_MOVE_OPTIMIZER_ |
7 | 7 |
8 #include "src/compiler/instruction.h" | 8 #include "src/compiler/instruction.h" |
9 #include "src/globals.h" | 9 #include "src/globals.h" |
10 #include "src/zone/zone-containers.h" | 10 #include "src/zone/zone-containers.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 const Instruction* LastInstruction(const InstructionBlock* block) const; | 46 const Instruction* LastInstruction(const InstructionBlock* block) const; |
47 | 47 |
48 // Consolidate common moves appearing accross all predecessors of a block. | 48 // Consolidate common moves appearing accross all predecessors of a block. |
49 void OptimizeMerge(InstructionBlock* block); | 49 void OptimizeMerge(InstructionBlock* block); |
50 void FinalizeMoves(Instruction* instr); | 50 void FinalizeMoves(Instruction* instr); |
51 | 51 |
52 Zone* const local_zone_; | 52 Zone* const local_zone_; |
53 InstructionSequence* const code_; | 53 InstructionSequence* const code_; |
54 MoveOpVector local_vector_; | 54 MoveOpVector local_vector_; |
55 | 55 |
| 56 // Reusable buffers for storing operand sets. We need at most two sets |
| 57 // at any given time, so we create two buffers. |
| 58 ZoneVector<InstructionOperand> operand_buffer1; |
| 59 ZoneVector<InstructionOperand> operand_buffer2; |
| 60 |
56 DISALLOW_COPY_AND_ASSIGN(MoveOptimizer); | 61 DISALLOW_COPY_AND_ASSIGN(MoveOptimizer); |
57 }; | 62 }; |
58 | 63 |
59 } // namespace compiler | 64 } // namespace compiler |
60 } // namespace internal | 65 } // namespace internal |
61 } // namespace v8 | 66 } // namespace v8 |
62 | 67 |
63 #endif // V8_COMPILER_MOVE_OPTIMIZER_ | 68 #endif // V8_COMPILER_MOVE_OPTIMIZER_ |
OLD | NEW |