summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2006-03-03 06:24:54 +0000
committerEvan Cheng <evan.cheng@apple.com>2006-03-03 06:24:54 +0000
commit80d8eaae05d9bcb25abf6c6f0385ec2554355f26 (patch)
treeea0fa6d134dac5c2773a09c7ed01cbf5d9f2cbd0 /include
parentfb43331226ae41cac862972c52a05f6c05dfcf19 (diff)
downloadllvm-80d8eaae05d9bcb25abf6c6f0385ec2554355f26.tar.gz
llvm-80d8eaae05d9bcb25abf6c6f0385ec2554355f26.tar.bz2
llvm-80d8eaae05d9bcb25abf6c6f0385ec2554355f26.tar.xz
Added isOperand(N): true if this is an operand of N
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26501 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/CodeGen/SelectionDAGNodes.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h
index 02feba7106..5f66b63574 100644
--- a/include/llvm/CodeGen/SelectionDAGNodes.h
+++ b/include/llvm/CodeGen/SelectionDAGNodes.h
@@ -542,6 +542,7 @@ public:
inline const SDOperand &getOperand(unsigned i) const;
inline bool isTargetOpcode() const;
inline unsigned getTargetOpcode() const;
+ inline const bool isOperand(SDNode *N) const;
/// hasOneUse - Return true if there is exactly one operation using this
/// result value of the defining operator.
@@ -631,6 +632,9 @@ public:
// isOnlyUse - Return true if this node is the only use of N.
bool isOnlyUse(SDNode *N) const;
+ // isOperand - Return true if this node is an operand of N.
+ bool isOperand(SDNode *N) const;
+
/// getNumOperands - Return the number of values used by this operation.
///
unsigned getNumOperands() const { return NumOperands; }
@@ -937,6 +941,9 @@ inline bool SDOperand::isTargetOpcode() const {
inline unsigned SDOperand::getTargetOpcode() const {
return Val->getTargetOpcode();
}
+inline const bool SDOperand::isOperand(SDNode *N) const {
+ return Val->isOperand(N);
+}
inline bool SDOperand::hasOneUse() const {
return Val->hasNUsesOfValue(1, ResNo);
}