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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 void EmitLookupSwitch(const SwitchInfo& sw, | 139 void EmitLookupSwitch(const SwitchInfo& sw, |
140 InstructionOperand& value_operand); | 140 InstructionOperand& value_operand); |
141 | 141 |
142 // Inform the instruction selection that {node} was just defined. | 142 // Inform the instruction selection that {node} was just defined. |
143 void MarkAsDefined(Node* node); | 143 void MarkAsDefined(Node* node); |
144 | 144 |
145 // Inform the instruction selection that {node} has at least one use and we | 145 // Inform the instruction selection that {node} has at least one use and we |
146 // will need to generate code for it. | 146 // will need to generate code for it. |
147 void MarkAsUsed(Node* node); | 147 void MarkAsUsed(Node* node); |
148 | 148 |
| 149 // Checks if {node} is marked as double. |
| 150 bool IsDouble(const Node* node) const; |
| 151 |
| 152 // Inform the register allocator of a double result. |
| 153 void MarkAsDouble(Node* node); |
| 154 |
| 155 // Checks if {node} is marked as reference. |
| 156 bool IsReference(const Node* node) const; |
| 157 |
| 158 // Inform the register allocator of a reference result. |
| 159 void MarkAsReference(Node* node); |
| 160 |
149 // Inform the register allocation of the representation of the value produced | 161 // Inform the register allocation of the representation of the value produced |
150 // by {node}. | 162 // by {node}. |
151 void MarkAsRepresentation(MachineType rep, Node* node); | 163 void MarkAsRepresentation(MachineType rep, Node* node); |
152 void MarkAsWord32(Node* node) { MarkAsRepresentation(kRepWord32, node); } | |
153 void MarkAsWord64(Node* node) { MarkAsRepresentation(kRepWord64, node); } | |
154 void MarkAsFloat32(Node* node) { MarkAsRepresentation(kRepFloat32, node); } | |
155 void MarkAsFloat64(Node* node) { MarkAsRepresentation(kRepFloat64, node); } | |
156 void MarkAsReference(Node* node) { MarkAsRepresentation(kRepTagged, node); } | |
157 | 164 |
158 // Inform the register allocation of the representation of the unallocated | 165 // Inform the register allocation of the representation of the unallocated |
159 // operand {op}. | 166 // operand {op}. |
160 void MarkAsRepresentation(MachineType rep, const InstructionOperand& op); | 167 void MarkAsRepresentation(MachineType rep, const InstructionOperand& op); |
161 | 168 |
162 // Initialize the call buffer with the InstructionOperands, nodes, etc, | 169 // Initialize the call buffer with the InstructionOperands, nodes, etc, |
163 // corresponding | 170 // corresponding |
164 // to the inputs and outputs of the call. | 171 // to the inputs and outputs of the call. |
165 // {call_code_immediate} to generate immediate operands to calls of code. | 172 // {call_code_immediate} to generate immediate operands to calls of code. |
166 // {call_address_immediate} to generate immediate operands to address calls. | 173 // {call_address_immediate} to generate immediate operands to address calls. |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 BoolVector defined_; | 233 BoolVector defined_; |
227 BoolVector used_; | 234 BoolVector used_; |
228 IntVector virtual_registers_; | 235 IntVector virtual_registers_; |
229 }; | 236 }; |
230 | 237 |
231 } // namespace compiler | 238 } // namespace compiler |
232 } // namespace internal | 239 } // namespace internal |
233 } // namespace v8 | 240 } // namespace v8 |
234 | 241 |
235 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_H_ | 242 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_H_ |
OLD | NEW |