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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 InstructionOperand* inputs, size_t temp_count = 0, | 98 InstructionOperand* inputs, size_t temp_count = 0, |
99 InstructionOperand* temps = nullptr); | 99 InstructionOperand* temps = nullptr); |
100 Instruction* Emit(Instruction* instr); | 100 Instruction* Emit(Instruction* instr); |
101 | 101 |
102 // =========================================================================== | 102 // =========================================================================== |
103 // ===== Architecture-independent deoptimization exit emission methods. ====== | 103 // ===== Architecture-independent deoptimization exit emission methods. ====== |
104 // =========================================================================== | 104 // =========================================================================== |
105 | 105 |
106 Instruction* EmitDeoptimize(InstructionCode opcode, InstructionOperand output, | 106 Instruction* EmitDeoptimize(InstructionCode opcode, InstructionOperand output, |
107 InstructionOperand a, InstructionOperand b, | 107 InstructionOperand a, InstructionOperand b, |
108 Node* frame_state); | 108 DeoptimizeReason reason, Node* frame_state); |
109 Instruction* EmitDeoptimize(InstructionCode opcode, size_t output_count, | 109 Instruction* EmitDeoptimize(InstructionCode opcode, size_t output_count, |
110 InstructionOperand* outputs, size_t input_count, | 110 InstructionOperand* outputs, size_t input_count, |
111 InstructionOperand* inputs, Node* frame_state); | 111 InstructionOperand* inputs, |
| 112 DeoptimizeReason reason, Node* frame_state); |
112 | 113 |
113 // =========================================================================== | 114 // =========================================================================== |
114 // ============== Architecture-independent CPU feature methods. ============== | 115 // ============== Architecture-independent CPU feature methods. ============== |
115 // =========================================================================== | 116 // =========================================================================== |
116 | 117 |
117 class Features final { | 118 class Features final { |
118 public: | 119 public: |
119 Features() : bits_(0) {} | 120 Features() : bits_(0) {} |
120 explicit Features(unsigned bits) : bits_(bits) {} | 121 explicit Features(unsigned bits) : bits_(bits) {} |
121 explicit Features(CpuFeature f) : bits_(1u << f) {} | 122 explicit Features(CpuFeature f) : bits_(1u << f) {} |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 void VisitPhi(Node* node); | 285 void VisitPhi(Node* node); |
285 void VisitProjection(Node* node); | 286 void VisitProjection(Node* node); |
286 void VisitConstant(Node* node); | 287 void VisitConstant(Node* node); |
287 void VisitCall(Node* call, BasicBlock* handler = nullptr); | 288 void VisitCall(Node* call, BasicBlock* handler = nullptr); |
288 void VisitDeoptimizeIf(Node* node); | 289 void VisitDeoptimizeIf(Node* node); |
289 void VisitDeoptimizeUnless(Node* node); | 290 void VisitDeoptimizeUnless(Node* node); |
290 void VisitTailCall(Node* call); | 291 void VisitTailCall(Node* call); |
291 void VisitGoto(BasicBlock* target); | 292 void VisitGoto(BasicBlock* target); |
292 void VisitBranch(Node* input, BasicBlock* tbranch, BasicBlock* fbranch); | 293 void VisitBranch(Node* input, BasicBlock* tbranch, BasicBlock* fbranch); |
293 void VisitSwitch(Node* node, const SwitchInfo& sw); | 294 void VisitSwitch(Node* node, const SwitchInfo& sw); |
294 void VisitDeoptimize(DeoptimizeKind kind, Node* value); | 295 void VisitDeoptimize(DeoptimizeKind kind, DeoptimizeReason reason, |
| 296 Node* value); |
295 void VisitReturn(Node* ret); | 297 void VisitReturn(Node* ret); |
296 void VisitThrow(Node* value); | 298 void VisitThrow(Node* value); |
297 | 299 |
298 void EmitPrepareArguments(ZoneVector<compiler::PushParameter>* arguments, | 300 void EmitPrepareArguments(ZoneVector<compiler::PushParameter>* arguments, |
299 const CallDescriptor* descriptor, Node* node); | 301 const CallDescriptor* descriptor, Node* node); |
300 | 302 |
301 void EmitIdentity(Node* node); | 303 void EmitIdentity(Node* node); |
302 bool CanProduceSignalingNaN(Node* node); | 304 bool CanProduceSignalingNaN(Node* node); |
303 | 305 |
304 // =========================================================================== | 306 // =========================================================================== |
(...skipping 21 matching lines...) Expand all Loading... |
326 IntVector virtual_registers_; | 328 IntVector virtual_registers_; |
327 InstructionScheduler* scheduler_; | 329 InstructionScheduler* scheduler_; |
328 Frame* frame_; | 330 Frame* frame_; |
329 }; | 331 }; |
330 | 332 |
331 } // namespace compiler | 333 } // namespace compiler |
332 } // namespace internal | 334 } // namespace internal |
333 } // namespace v8 | 335 } // namespace v8 |
334 | 336 |
335 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_H_ | 337 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_H_ |
OLD | NEW |