Index: src/compiler/node.cc |
diff --git a/src/compiler/node.cc b/src/compiler/node.cc |
index 758be07d40d6529b6316b1ea31f1a28b4e9b9559..05c1d9e1eabc15a0f243af5ddf1b890e6f5070e1 100644 |
--- a/src/compiler/node.cc |
+++ b/src/compiler/node.cc |
@@ -296,6 +296,18 @@ 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 && |
+ from->opcode() != IrOpcode::kStore && |
danno
2017/02/21 16:11:01
Careful here, don't you have to make sure that the
shiyu.zhang
2017/02/23 01:20:48
OwnedByAddressingOperand is only used by left oper
danno
2017/02/23 08:49:34
Well, this builds in a pretty explicit and fragile
|
+ from->opcode() != IrOpcode::kInt32Add && |
+ from->opcode() != IrOpcode::kInt64Add) { |
+ return false; |
+ } |
+ } |
+ return true; |
+} |
void Node::Print() const { |
OFStream os(stdout); |