diff options
author | Evan Cheng <evan.cheng@apple.com> | 2006-03-03 06:24:54 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2006-03-03 06:24:54 +0000 |
commit | 6b08ae84978d4e47e6f6df5eb6d98c3614d61889 (patch) | |
tree | 1d75aa5655505147e1b1998d2503720f8ecd4f20 /llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | |
parent | 5e9a6950264cc4d7453e2438a8dae9607a5615fd (diff) | |
download | bcm5719-llvm-6b08ae84978d4e47e6f6df5eb6d98c3614d61889.tar.gz bcm5719-llvm-6b08ae84978d4e47e6f6df5eb6d98c3614d61889.zip |
Added isOperand(N): true if this is an operand of N
llvm-svn: 26501
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 24497af2348..293ea60c334 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -2533,6 +2533,13 @@ bool SDNode::isOnlyUse(SDNode *N) const { return Seen; } +// isOperand - Return true if this node is an operand of N. +bool SDNode::isOperand(SDNode *N) const { + for (unsigned i = 0, e = N->NumOperands; i != e; ++i) + if (this == N->OperandList[i].Val) + return true; + return false; +} const char *SDNode::getOperationName(const SelectionDAG *G) const { switch (getOpcode()) { |