mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Initial target-independent CodeGen support for BlockAddresses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85556 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -97,7 +97,7 @@ namespace ISD {
|
||||
BasicBlock, VALUETYPE, CONDCODE, Register,
|
||||
Constant, ConstantFP,
|
||||
GlobalAddress, GlobalTLSAddress, FrameIndex,
|
||||
JumpTable, ConstantPool, ExternalSymbol,
|
||||
JumpTable, ConstantPool, ExternalSymbol, BlockAddress,
|
||||
|
||||
// The address of the GOT
|
||||
GLOBAL_OFFSET_TABLE,
|
||||
@@ -146,6 +146,7 @@ namespace ISD {
|
||||
TargetJumpTable,
|
||||
TargetConstantPool,
|
||||
TargetExternalSymbol,
|
||||
TargetBlockAddress,
|
||||
|
||||
/// RESULT = INTRINSIC_WO_CHAIN(INTRINSICID, arg1, arg2, ...)
|
||||
/// This node represents a target intrinsic function with no side effects.
|
||||
@@ -2026,11 +2027,27 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class BlockAddressSDNode : public SDNode {
|
||||
BlockAddress *BA;
|
||||
friend class SelectionDAG;
|
||||
BlockAddressSDNode(unsigned NodeTy, DebugLoc dl, EVT VT, BlockAddress *ba)
|
||||
: SDNode(NodeTy, dl, getSDVTList(VT)), BA(ba) {
|
||||
}
|
||||
public:
|
||||
BlockAddress *getBlockAddress() const { return BA; }
|
||||
|
||||
static bool classof(const BlockAddressSDNode *) { return true; }
|
||||
static bool classof(const SDNode *N) {
|
||||
return N->getOpcode() == ISD::BlockAddress ||
|
||||
N->getOpcode() == ISD::TargetBlockAddress;
|
||||
}
|
||||
};
|
||||
|
||||
class LabelSDNode : public SDNode {
|
||||
SDUse Chain;
|
||||
unsigned LabelID;
|
||||
friend class SelectionDAG;
|
||||
LabelSDNode(unsigned NodeTy, DebugLoc dl, SDValue ch, unsigned id)
|
||||
LabelSDNode(unsigned NodeTy, DebugLoc dl, SDValue ch, unsigned id)
|
||||
: SDNode(NodeTy, dl, getSDVTList(MVT::Other)), LabelID(id) {
|
||||
InitOperands(&Chain, ch);
|
||||
}
|
||||
|
Reference in New Issue
Block a user