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_INSTRUCTION_SELECTOR_H_ | 5 #ifndef V8_COMPILER_INSTRUCTION_SELECTOR_H_ |
6 #define V8_COMPILER_INSTRUCTION_SELECTOR_H_ | 6 #define V8_COMPILER_INSTRUCTION_SELECTOR_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "src/compiler/common-operator.h" | 10 #include "src/compiler/common-operator.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 class InstructionSelector final { | 45 class InstructionSelector final { |
46 public: | 46 public: |
47 // Forward declarations. | 47 // Forward declarations. |
48 class Features; | 48 class Features; |
49 | 49 |
50 enum SourcePositionMode { kCallSourcePositions, kAllSourcePositions }; | 50 enum SourcePositionMode { kCallSourcePositions, kAllSourcePositions }; |
51 | 51 |
52 InstructionSelector( | 52 InstructionSelector( |
53 Zone* zone, size_t node_count, Linkage* linkage, | 53 Zone* zone, size_t node_count, Linkage* linkage, |
54 InstructionSequence* sequence, Schedule* schedule, | 54 InstructionSequence* sequence, Schedule* schedule, |
55 SourcePositionTable* source_positions, Frame* frame, | 55 SourcePositionTable* source_positions, |
56 SourcePositionMode source_position_mode = kCallSourcePositions, | 56 SourcePositionMode source_position_mode = kCallSourcePositions, |
57 Features features = SupportedFeatures()); | 57 Features features = SupportedFeatures()); |
58 | 58 |
59 // Visit code for the entire graph with the included schedule. | 59 // Visit code for the entire graph with the included schedule. |
60 void SelectInstructions(); | 60 void SelectInstructions(); |
61 | 61 |
62 void StartBlock(RpoNumber rpo); | 62 void StartBlock(RpoNumber rpo); |
63 void EndBlock(RpoNumber rpo); | 63 void EndBlock(RpoNumber rpo); |
64 void AddInstruction(Instruction* instr); | 64 void AddInstruction(Instruction* instr); |
65 | 65 |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 SourcePositionTable* const source_positions_; | 264 SourcePositionTable* const source_positions_; |
265 SourcePositionMode const source_position_mode_; | 265 SourcePositionMode const source_position_mode_; |
266 Features features_; | 266 Features features_; |
267 Schedule* const schedule_; | 267 Schedule* const schedule_; |
268 BasicBlock* current_block_; | 268 BasicBlock* current_block_; |
269 ZoneVector<Instruction*> instructions_; | 269 ZoneVector<Instruction*> instructions_; |
270 BoolVector defined_; | 270 BoolVector defined_; |
271 BoolVector used_; | 271 BoolVector used_; |
272 IntVector virtual_registers_; | 272 IntVector virtual_registers_; |
273 InstructionScheduler* scheduler_; | 273 InstructionScheduler* scheduler_; |
274 Frame* frame_; | |
275 }; | 274 }; |
276 | 275 |
277 } // namespace compiler | 276 } // namespace compiler |
278 } // namespace internal | 277 } // namespace internal |
279 } // namespace v8 | 278 } // namespace v8 |
280 | 279 |
281 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_H_ | 280 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_H_ |
OLD | NEW |