mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-27 00:21:03 +00:00
Add a RegisterMaskSDNode class.
This SelectionDAG node will be attached to call nodes by LowerCall(), and eventually becomes a MO_RegisterMask MachineOperand on the MachineInstr representing the call instruction. LowerCall() will attach a register mask that depends on the calling convention. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148436 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -57,7 +57,7 @@ namespace ISD {
|
||||
AssertSext, AssertZext,
|
||||
|
||||
// Various leaf nodes.
|
||||
BasicBlock, VALUETYPE, CONDCODE, Register,
|
||||
BasicBlock, VALUETYPE, CONDCODE, Register, RegisterMask,
|
||||
Constant, ConstantFP,
|
||||
GlobalAddress, GlobalTLSAddress, FrameIndex,
|
||||
JumpTable, ConstantPool, ExternalSymbol, BlockAddress,
|
||||
|
@@ -394,6 +394,7 @@ public:
|
||||
unsigned char TargetFlags = 0);
|
||||
SDValue getValueType(EVT);
|
||||
SDValue getRegister(unsigned Reg, EVT VT);
|
||||
SDValue getRegisterMask(const uint32_t *RegMask);
|
||||
SDValue getEHLabel(DebugLoc dl, SDValue Root, MCSymbol *Label);
|
||||
SDValue getBlockAddress(const BlockAddress *BA, EVT VT,
|
||||
bool isTarget = false, unsigned char TargetFlags = 0);
|
||||
|
@@ -1433,6 +1433,23 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class RegisterMaskSDNode : public SDNode {
|
||||
// The memory for RegMask is not owned by the node.
|
||||
const uint32_t *RegMask;
|
||||
friend class SelectionDAG;
|
||||
RegisterMaskSDNode(const uint32_t *mask)
|
||||
: SDNode(ISD::RegisterMask, DebugLoc(), getSDVTList(MVT::Untyped)),
|
||||
RegMask(mask) {}
|
||||
public:
|
||||
|
||||
const uint32_t *getRegMask() const { return RegMask; }
|
||||
|
||||
static bool classof(const RegisterMaskSDNode *) { return true; }
|
||||
static bool classof(const SDNode *N) {
|
||||
return N->getOpcode() == ISD::RegisterMask;
|
||||
}
|
||||
};
|
||||
|
||||
class BlockAddressSDNode : public SDNode {
|
||||
const BlockAddress *BA;
|
||||
unsigned char TargetFlags;
|
||||
|
Reference in New Issue
Block a user