mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-09 11:25:55 +00:00
Add a utility function to SDOperand for testing if a value is unused.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42038 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -766,6 +766,10 @@ public:
|
|||||||
/// hasOneUse - Return true if there is exactly one operation using this
|
/// hasOneUse - Return true if there is exactly one operation using this
|
||||||
/// result value of the defining operator.
|
/// result value of the defining operator.
|
||||||
inline bool hasOneUse() const;
|
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 {
|
inline bool SDOperand::hasOneUse() const {
|
||||||
return Val->hasNUsesOfValue(1, ResNo);
|
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
|
/// UnarySDNode - This class is used for single-operand SDNodes. This is solely
|
||||||
/// to allow co-allocation of node operands with the node itself.
|
/// to allow co-allocation of node operands with the node itself.
|
||||||
|
Reference in New Issue
Block a user