Index: src/compiler/node.cc |
diff --git a/src/compiler/node.cc b/src/compiler/node.cc |
index 758be07d40d6529b6316b1ea31f1a28b4e9b9559..16dc2dbab2d24f07a0ee5fad888f8aa6a7eba0b3 100644 |
--- a/src/compiler/node.cc |
+++ b/src/compiler/node.cc |
@@ -296,6 +296,19 @@ bool Node::OwnedBy(Node const* owner1, Node const* owner2) const { |
return mask == 3; |
} |
+bool Node::OwnedByAddressingOperand() const { |
+ for (Use* use = first_use_; use; use = use->next) { |
+ Node* from = use->from(); |
+ if (from->opcode() != IrOpcode::kLoad && |
+ // If {from} is store, make sure it does not use {this} as value |
+ (from->opcode() != IrOpcode::kStore || from->InputAt(2) == this) && |
+ from->opcode() != IrOpcode::kInt32Add && |
+ from->opcode() != IrOpcode::kInt64Add) { |
+ return false; |
+ } |
+ } |
+ return true; |
+} |
void Node::Print() const { |
OFStream os(stdout); |