mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-30 04:35:00 +00:00
add a helper class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23633 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5c46f74ec7
commit
d623e953fc
@ -309,6 +309,9 @@ namespace ISD {
|
||||
// other operands match the intrinsic. These produce a token chain in
|
||||
// addition to a value (if any).
|
||||
READPORT, WRITEPORT, READIO, WRITEIO,
|
||||
|
||||
// HANDLENODE node - Used as a handle for various purposes.
|
||||
HANDLENODE,
|
||||
|
||||
// BUILTIN_OP_END - This must be the last enum value in this list.
|
||||
BUILTIN_OP_END,
|
||||
@ -751,6 +754,20 @@ inline bool SDOperand::hasOneUse() const {
|
||||
return Val->hasNUsesOfValue(1, ResNo);
|
||||
}
|
||||
|
||||
/// HandleSDNode - This class is used to form a handle around another node that
|
||||
/// is persistant and is updated across invocations of replaceAllUsesWith on its
|
||||
/// operand. This node should be directly created by end-users and not added to
|
||||
/// the AllNodes list.
|
||||
class HandleSDNode : public SDNode {
|
||||
public:
|
||||
HandleSDNode(SDOperand X) : SDNode(ISD::HANDLENODE, X) {}
|
||||
~HandleSDNode() {
|
||||
MorphNodeTo(ISD::HANDLENODE); // Drops operand uses.
|
||||
}
|
||||
|
||||
SDOperand getValue() const { return getOperand(0); }
|
||||
};
|
||||
|
||||
|
||||
class ConstantSDNode : public SDNode {
|
||||
uint64_t Value;
|
||||
|
Loading…
x
Reference in New Issue
Block a user