| 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 <deque> | 8 #include <deque> |
| 9 | 9 |
| 10 #include "src/compiler/common-operator.h" | 10 #include "src/compiler/common-operator.h" |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 bool IsLive(Node* node) const { return !IsDefined(node) && IsUsed(node); } | 126 bool IsLive(Node* node) const { return !IsDefined(node) && IsUsed(node); } |
| 127 | 127 |
| 128 int GetVirtualRegister(const Node* node); | 128 int GetVirtualRegister(const Node* node); |
| 129 // Gets the current mapping if it exists, kNodeUnmapped otherwise. | 129 // Gets the current mapping if it exists, kNodeUnmapped otherwise. |
| 130 int GetMappedVirtualRegister(const Node* node) const; | 130 int GetMappedVirtualRegister(const Node* node) const; |
| 131 const NodeToVregMap& GetNodeMapForTesting() const { return node_map_; } | 131 const NodeToVregMap& GetNodeMapForTesting() const { return node_map_; } |
| 132 | 132 |
| 133 private: | 133 private: |
| 134 friend class OperandGenerator; | 134 friend class OperandGenerator; |
| 135 | 135 |
| 136 // Checks if {block} will appear directly after {current_block_} when | |
| 137 // assembling code, in which case, a fall-through can be used. | |
| 138 bool IsNextInAssemblyOrder(const BasicBlock* block) const; | |
| 139 | |
| 140 // Inform the instruction selection that {node} was just defined. | 136 // Inform the instruction selection that {node} was just defined. |
| 141 void MarkAsDefined(Node* node); | 137 void MarkAsDefined(Node* node); |
| 142 | 138 |
| 143 // Inform the instruction selection that {node} has at least one use and we | 139 // Inform the instruction selection that {node} has at least one use and we |
| 144 // will need to generate code for it. | 140 // will need to generate code for it. |
| 145 void MarkAsUsed(Node* node); | 141 void MarkAsUsed(Node* node); |
| 146 | 142 |
| 147 // Checks if {node} is marked as double. | 143 // Checks if {node} is marked as double. |
| 148 bool IsDouble(const Node* node) const; | 144 bool IsDouble(const Node* node) const; |
| 149 | 145 |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 ZoneDeque<Instruction*> instructions_; | 227 ZoneDeque<Instruction*> instructions_; |
| 232 BoolVector defined_; | 228 BoolVector defined_; |
| 233 BoolVector used_; | 229 BoolVector used_; |
| 234 }; | 230 }; |
| 235 | 231 |
| 236 } // namespace compiler | 232 } // namespace compiler |
| 237 } // namespace internal | 233 } // namespace internal |
| 238 } // namespace v8 | 234 } // namespace v8 |
| 239 | 235 |
| 240 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_H_ | 236 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_H_ |
| OLD | NEW |