OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_NODE_H_ | 5 #ifndef V8_COMPILER_NODE_H_ |
6 #define V8_COMPILER_NODE_H_ | 6 #define V8_COMPILER_NODE_H_ |
7 | 7 |
8 #include "src/compiler/opcodes.h" | 8 #include "src/compiler/opcodes.h" |
9 #include "src/compiler/operator.h" | 9 #include "src/compiler/operator.h" |
10 #include "src/compiler/types.h" | 10 #include "src/compiler/types.h" |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 | 151 |
152 Uses uses() { return Uses(this); } | 152 Uses uses() { return Uses(this); } |
153 | 153 |
154 // Returns true if {owner} is the user of {this} node. | 154 // Returns true if {owner} is the user of {this} node. |
155 bool OwnedBy(Node* owner) const { | 155 bool OwnedBy(Node* owner) const { |
156 return first_use_ && first_use_->from() == owner && !first_use_->next; | 156 return first_use_ && first_use_->from() == owner && !first_use_->next; |
157 } | 157 } |
158 | 158 |
159 // Returns true if {owner1} and {owner2} are the only users of {this} node. | 159 // Returns true if {owner1} and {owner2} are the only users of {this} node. |
160 bool OwnedBy(Node const* owner1, Node const* owner2) const; | 160 bool OwnedBy(Node const* owner1, Node const* owner2) const; |
| 161 |
| 162 // Returns true if addressing related operands (such as load, store, lea) |
| 163 // are the only users of {this} node. |
| 164 bool OwnedByAddressingOperand() const; |
161 void Print() const; | 165 void Print() const; |
162 | 166 |
163 private: | 167 private: |
164 struct Use; | 168 struct Use; |
165 // Out of line storage for inputs when the number of inputs overflowed the | 169 // Out of line storage for inputs when the number of inputs overflowed the |
166 // capacity of the inline-allocated space. | 170 // capacity of the inline-allocated space. |
167 struct OutOfLineInputs { | 171 struct OutOfLineInputs { |
168 Node* node_; | 172 Node* node_; |
169 int count_; | 173 int count_; |
170 int capacity_; | 174 int capacity_; |
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
620 } | 624 } |
621 | 625 |
622 | 626 |
623 Node::Uses::const_iterator Node::Uses::end() const { return const_iterator(); } | 627 Node::Uses::const_iterator Node::Uses::end() const { return const_iterator(); } |
624 | 628 |
625 } // namespace compiler | 629 } // namespace compiler |
626 } // namespace internal | 630 } // namespace internal |
627 } // namespace v8 | 631 } // namespace v8 |
628 | 632 |
629 #endif // V8_COMPILER_NODE_H_ | 633 #endif // V8_COMPILER_NODE_H_ |
OLD | NEW |