mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-15 19:24:33 +00:00
Improve comments for SDNode use-count methods. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54123 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -858,13 +858,15 @@ public:
|
|||||||
bool reachesChainWithoutSideEffects(SDOperand Dest,
|
bool reachesChainWithoutSideEffects(SDOperand Dest,
|
||||||
unsigned Depth = 2) const;
|
unsigned Depth = 2) const;
|
||||||
|
|
||||||
/// hasOneUse - Return true if there is exactly one operation using this
|
/// use_empty - Return true if there are no nodes using value ResNo
|
||||||
/// result value of the defining operator.
|
/// of node Val.
|
||||||
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;
|
inline bool use_empty() const;
|
||||||
|
|
||||||
|
/// use_empty - Return true if there is exactly one node using value
|
||||||
|
/// ResNo of node Val.
|
||||||
|
///
|
||||||
|
inline bool hasOneUse() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -1096,12 +1098,21 @@ public:
|
|||||||
return ~NodeType;
|
return ~NodeType;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t use_size() const { return std::distance(use_begin(), use_end()); }
|
/// use_empty - Return true if there are no uses of this value.
|
||||||
|
///
|
||||||
bool use_empty() const { return Uses == NULL; }
|
bool use_empty() const { return Uses == NULL; }
|
||||||
|
|
||||||
|
/// hasOneUse - Return true if there is exactly one use of this value.
|
||||||
|
///
|
||||||
bool hasOneUse() const {
|
bool hasOneUse() const {
|
||||||
return !use_empty() && next(use_begin()) == use_end();
|
return !use_empty() && next(use_begin()) == use_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// use_size - Return the number of uses of this value. This method takes
|
||||||
|
/// time proportional to the number of uses.
|
||||||
|
///
|
||||||
|
size_t use_size() const { return std::distance(use_begin(), use_end()); }
|
||||||
|
|
||||||
/// getNodeId - Return the unique node id.
|
/// getNodeId - Return the unique node id.
|
||||||
///
|
///
|
||||||
int getNodeId() const { return NodeId; }
|
int getNodeId() const { return NodeId; }
|
||||||
@@ -1373,12 +1384,12 @@ inline bool SDOperand::isMachineOpcode() const {
|
|||||||
inline unsigned SDOperand::getMachineOpcode() const {
|
inline unsigned SDOperand::getMachineOpcode() const {
|
||||||
return Val->getMachineOpcode();
|
return Val->getMachineOpcode();
|
||||||
}
|
}
|
||||||
inline bool SDOperand::hasOneUse() const {
|
|
||||||
return Val->hasNUsesOfValue(1, ResNo);
|
|
||||||
}
|
|
||||||
inline bool SDOperand::use_empty() const {
|
inline bool SDOperand::use_empty() const {
|
||||||
return !Val->hasAnyUseOfValue(ResNo);
|
return !Val->hasAnyUseOfValue(ResNo);
|
||||||
}
|
}
|
||||||
|
inline bool SDOperand::hasOneUse() const {
|
||||||
|
return Val->hasNUsesOfValue(1, 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