aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm')
-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 4f44c4f..40a88eb 100644
--- a/include/llvm/CodeGen/SelectionDAGNodes.h
+++ b/include/llvm/CodeGen/SelectionDAGNodes.h
@@ -766,6 +766,10 @@ public:
/// hasOneUse - Return true if there is exactly one operation using this
/// result value of the defining operator.
inline bool hasOneUse() const;
+
+ /// use_empty - Return true if there are no operations using this
+ /// result value of the defining operator.
+ inline bool use_empty() const;
};
@@ -1035,6 +1039,9 @@ inline unsigned SDOperand::getTargetOpcode() const {
inline bool SDOperand::hasOneUse() const {
return Val->hasNUsesOfValue(1, ResNo);
}
+inline bool SDOperand::use_empty() const {
+ return !Val->hasAnyUseOfValue(ResNo);
+}
/// UnarySDNode - This class is used for single-operand SDNodes. This is solely
/// to allow co-allocation of node operands with the node itself.