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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 | 77 |
78 bool IsSupported(CpuFeature feature) const { | 78 bool IsSupported(CpuFeature feature) const { |
79 return features_.Contains(feature); | 79 return features_.Contains(feature); |
80 } | 80 } |
81 | 81 |
82 // Returns the features supported on the target platform. | 82 // Returns the features supported on the target platform. |
83 static Features SupportedFeatures() { | 83 static Features SupportedFeatures() { |
84 return Features(CpuFeatures::SupportedFeatures()); | 84 return Features(CpuFeatures::SupportedFeatures()); |
85 } | 85 } |
86 | 86 |
| 87 // Checks if {node} is currently live. |
| 88 bool IsLive(Node* node) const { return !IsDefined(node) && IsUsed(node); } |
| 89 |
87 private: | 90 private: |
88 friend class OperandGenerator; | 91 friend class OperandGenerator; |
89 | 92 |
90 // =========================================================================== | 93 // =========================================================================== |
91 // ============ Architecture-independent graph covering methods. ============= | 94 // ============ Architecture-independent graph covering methods. ============= |
92 // =========================================================================== | 95 // =========================================================================== |
93 | 96 |
94 // Checks if {block} will appear directly after {current_block_} when | 97 // Checks if {block} will appear directly after {current_block_} when |
95 // assembling code, in which case, a fall-through can be used. | 98 // assembling code, in which case, a fall-through can be used. |
96 bool IsNextInAssemblyOrder(const BasicBlock* block) const; | 99 bool IsNextInAssemblyOrder(const BasicBlock* block) const; |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 ZoneDeque<Instruction*> instructions_; | 207 ZoneDeque<Instruction*> instructions_; |
205 BoolVector defined_; | 208 BoolVector defined_; |
206 BoolVector used_; | 209 BoolVector used_; |
207 }; | 210 }; |
208 | 211 |
209 } // namespace compiler | 212 } // namespace compiler |
210 } // namespace internal | 213 } // namespace internal |
211 } // namespace v8 | 214 } // namespace v8 |
212 | 215 |
213 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_H_ | 216 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_H_ |
OLD | NEW |