parent
47a65a167d
commit
a72d41a67b
|
@ -1524,10 +1524,6 @@ inline void SDUse::setNode(SDNode *N) {
|
||||||
class UnarySDNode : public SDNode {
|
class UnarySDNode : public SDNode {
|
||||||
SDUse Op;
|
SDUse Op;
|
||||||
public:
|
public:
|
||||||
UnarySDNode(unsigned Opc, SDVTList VTs, SDValue X)
|
|
||||||
: SDNode(Opc, VTs) {
|
|
||||||
InitOperands(&Op, X);
|
|
||||||
}
|
|
||||||
UnarySDNode(unsigned Opc, DebugLoc dl, SDVTList VTs, SDValue X)
|
UnarySDNode(unsigned Opc, DebugLoc dl, SDVTList VTs, SDValue X)
|
||||||
: SDNode(Opc, dl, VTs) {
|
: SDNode(Opc, dl, VTs) {
|
||||||
InitOperands(&Op, X);
|
InitOperands(&Op, X);
|
||||||
|
@ -1539,10 +1535,6 @@ public:
|
||||||
class BinarySDNode : public SDNode {
|
class BinarySDNode : public SDNode {
|
||||||
SDUse Ops[2];
|
SDUse Ops[2];
|
||||||
public:
|
public:
|
||||||
BinarySDNode(unsigned Opc, SDVTList VTs, SDValue X, SDValue Y)
|
|
||||||
: SDNode(Opc, VTs) {
|
|
||||||
InitOperands(Ops, X, Y);
|
|
||||||
}
|
|
||||||
BinarySDNode(unsigned Opc, DebugLoc dl, SDVTList VTs, SDValue X, SDValue Y)
|
BinarySDNode(unsigned Opc, DebugLoc dl, SDVTList VTs, SDValue X, SDValue Y)
|
||||||
: SDNode(Opc, dl, VTs) {
|
: SDNode(Opc, dl, VTs) {
|
||||||
InitOperands(Ops, X, Y);
|
InitOperands(Ops, X, Y);
|
||||||
|
@ -1554,11 +1546,6 @@ public:
|
||||||
class TernarySDNode : public SDNode {
|
class TernarySDNode : public SDNode {
|
||||||
SDUse Ops[3];
|
SDUse Ops[3];
|
||||||
public:
|
public:
|
||||||
TernarySDNode(unsigned Opc, SDVTList VTs, SDValue X, SDValue Y,
|
|
||||||
SDValue Z)
|
|
||||||
: SDNode(Opc, VTs) {
|
|
||||||
InitOperands(Ops, X, Y, Z);
|
|
||||||
}
|
|
||||||
TernarySDNode(unsigned Opc, DebugLoc dl, SDVTList VTs, SDValue X, SDValue Y,
|
TernarySDNode(unsigned Opc, DebugLoc dl, SDVTList VTs, SDValue X, SDValue Y,
|
||||||
SDValue Z)
|
SDValue Z)
|
||||||
: SDNode(Opc, dl, VTs) {
|
: SDNode(Opc, dl, VTs) {
|
||||||
|
@ -1601,14 +1588,6 @@ private:
|
||||||
int SVOffset;
|
int SVOffset;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MemSDNode(unsigned Opc, SDVTList VTs, MVT MemoryVT,
|
|
||||||
const Value *srcValue, int SVOff,
|
|
||||||
unsigned alignment, bool isvolatile);
|
|
||||||
|
|
||||||
MemSDNode(unsigned Opc, SDVTList VTs, const SDValue *Ops, unsigned NumOps,
|
|
||||||
MVT MemoryVT, const Value *srcValue, int SVOff,
|
|
||||||
unsigned alignment, bool isvolatile);
|
|
||||||
|
|
||||||
MemSDNode(unsigned Opc, DebugLoc dl, SDVTList VTs, MVT MemoryVT,
|
MemSDNode(unsigned Opc, DebugLoc dl, SDVTList VTs, MVT MemoryVT,
|
||||||
const Value *srcValue, int SVOff,
|
const Value *srcValue, int SVOff,
|
||||||
unsigned alignment, bool isvolatile);
|
unsigned alignment, bool isvolatile);
|
||||||
|
@ -1684,21 +1663,6 @@ public:
|
||||||
// Swp: swap value
|
// Swp: swap value
|
||||||
// SrcVal: address to update as a Value (used for MemOperand)
|
// SrcVal: address to update as a Value (used for MemOperand)
|
||||||
// Align: alignment of memory
|
// Align: alignment of memory
|
||||||
AtomicSDNode(unsigned Opc, SDVTList VTL, MVT MemVT,
|
|
||||||
SDValue Chain, SDValue Ptr,
|
|
||||||
SDValue Cmp, SDValue Swp, const Value* SrcVal,
|
|
||||||
unsigned Align=0)
|
|
||||||
: MemSDNode(Opc, VTL, MemVT, SrcVal, /*SVOffset=*/0,
|
|
||||||
Align, /*isVolatile=*/true) {
|
|
||||||
InitOperands(Ops, Chain, Ptr, Cmp, Swp);
|
|
||||||
}
|
|
||||||
AtomicSDNode(unsigned Opc, SDVTList VTL, MVT MemVT,
|
|
||||||
SDValue Chain, SDValue Ptr,
|
|
||||||
SDValue Val, const Value* SrcVal, unsigned Align=0)
|
|
||||||
: MemSDNode(Opc, VTL, MemVT, SrcVal, /*SVOffset=*/0,
|
|
||||||
Align, /*isVolatile=*/true) {
|
|
||||||
InitOperands(Ops, Chain, Ptr, Val);
|
|
||||||
}
|
|
||||||
AtomicSDNode(unsigned Opc, DebugLoc dl, SDVTList VTL, MVT MemVT,
|
AtomicSDNode(unsigned Opc, DebugLoc dl, SDVTList VTL, MVT MemVT,
|
||||||
SDValue Chain, SDValue Ptr,
|
SDValue Chain, SDValue Ptr,
|
||||||
SDValue Cmp, SDValue Swp, const Value* SrcVal,
|
SDValue Cmp, SDValue Swp, const Value* SrcVal,
|
||||||
|
@ -1748,13 +1712,6 @@ class MemIntrinsicSDNode : public MemSDNode {
|
||||||
bool ReadMem; // Intrinsic reads memory
|
bool ReadMem; // Intrinsic reads memory
|
||||||
bool WriteMem; // Intrinsic writes memory
|
bool WriteMem; // Intrinsic writes memory
|
||||||
public:
|
public:
|
||||||
MemIntrinsicSDNode(unsigned Opc, SDVTList VTs,
|
|
||||||
const SDValue *Ops, unsigned NumOps,
|
|
||||||
MVT MemoryVT, const Value *srcValue, int SVO,
|
|
||||||
unsigned Align, bool Vol, bool ReadMem, bool WriteMem)
|
|
||||||
: MemSDNode(Opc, VTs, Ops, NumOps, MemoryVT, srcValue, SVO, Align, Vol),
|
|
||||||
ReadMem(ReadMem), WriteMem(WriteMem) {
|
|
||||||
}
|
|
||||||
MemIntrinsicSDNode(unsigned Opc, DebugLoc dl, SDVTList VTs,
|
MemIntrinsicSDNode(unsigned Opc, DebugLoc dl, SDVTList VTs,
|
||||||
const SDValue *Ops, unsigned NumOps,
|
const SDValue *Ops, unsigned NumOps,
|
||||||
MVT MemoryVT, const Value *srcValue, int SVO,
|
MVT MemoryVT, const Value *srcValue, int SVO,
|
||||||
|
@ -2088,11 +2045,6 @@ class LabelSDNode : public SDNode {
|
||||||
unsigned LabelID;
|
unsigned LabelID;
|
||||||
protected:
|
protected:
|
||||||
friend class SelectionDAG;
|
friend class SelectionDAG;
|
||||||
LabelSDNode(unsigned NodeTy, SDValue ch, unsigned id)
|
|
||||||
: SDNode(NodeTy, getSDVTList(MVT::Other)), LabelID(id) {
|
|
||||||
InitOperands(&Chain, ch);
|
|
||||||
}
|
|
||||||
LabelSDNode(unsigned NodeTy, DebugLoc dl, SDValue ch, unsigned id)
|
|
||||||
: SDNode(NodeTy, dl, getSDVTList(MVT::Other)), LabelID(id) {
|
: SDNode(NodeTy, dl, getSDVTList(MVT::Other)), LabelID(id) {
|
||||||
InitOperands(&Chain, ch);
|
InitOperands(&Chain, ch);
|
||||||
}
|
}
|
||||||
|
@ -2152,11 +2104,6 @@ class CvtRndSatSDNode : public SDNode {
|
||||||
ISD::CvtCode CvtCode;
|
ISD::CvtCode CvtCode;
|
||||||
protected:
|
protected:
|
||||||
friend class SelectionDAG;
|
friend class SelectionDAG;
|
||||||
explicit CvtRndSatSDNode(MVT VT, const SDValue *Ops, unsigned NumOps,
|
|
||||||
ISD::CvtCode Code)
|
|
||||||
: SDNode(ISD::CONVERT_RNDSAT, getSDVTList(VT), Ops, NumOps), CvtCode(Code) {
|
|
||||||
assert(NumOps == 5 && "wrong number of operations");
|
|
||||||
}
|
|
||||||
explicit CvtRndSatSDNode(MVT VT, DebugLoc dl, const SDValue *Ops,
|
explicit CvtRndSatSDNode(MVT VT, DebugLoc dl, const SDValue *Ops,
|
||||||
unsigned NumOps, ISD::CvtCode Code)
|
unsigned NumOps, ISD::CvtCode Code)
|
||||||
: SDNode(ISD::CONVERT_RNDSAT, dl, getSDVTList(VT), Ops, NumOps),
|
: SDNode(ISD::CONVERT_RNDSAT, dl, getSDVTList(VT), Ops, NumOps),
|
||||||
|
@ -2285,11 +2232,6 @@ class CallSDNode : public SDNode {
|
||||||
bool Inreg;
|
bool Inreg;
|
||||||
protected:
|
protected:
|
||||||
friend class SelectionDAG;
|
friend class SelectionDAG;
|
||||||
CallSDNode(unsigned cc, bool isvararg, bool istailcall, bool isinreg,
|
|
||||||
SDVTList VTs, const SDValue *Operands, unsigned numOperands)
|
|
||||||
: SDNode(ISD::CALL, VTs, Operands, numOperands),
|
|
||||||
CallingConv(cc), IsVarArg(isvararg), IsTailCall(istailcall),
|
|
||||||
Inreg(isinreg) {}
|
|
||||||
CallSDNode(unsigned cc, DebugLoc dl, bool isvararg, bool istailcall,
|
CallSDNode(unsigned cc, DebugLoc dl, bool isvararg, bool istailcall,
|
||||||
bool isinreg, SDVTList VTs, const SDValue *Operands,
|
bool isinreg, SDVTList VTs, const SDValue *Operands,
|
||||||
unsigned numOperands)
|
unsigned numOperands)
|
||||||
|
@ -2360,17 +2302,6 @@ protected:
|
||||||
*/
|
*/
|
||||||
SDUse Ops[4];
|
SDUse Ops[4];
|
||||||
public:
|
public:
|
||||||
LSBaseSDNode(ISD::NodeType NodeTy, SDValue *Operands, unsigned numOperands,
|
|
||||||
SDVTList VTs, ISD::MemIndexedMode AM, MVT VT,
|
|
||||||
const Value *SV, int SVO, unsigned Align, bool Vol)
|
|
||||||
: MemSDNode(NodeTy, VTs, VT, SV, SVO, Align, Vol) {
|
|
||||||
assert(Align != 0 && "Loads and stores should have non-zero aligment");
|
|
||||||
SubclassData |= AM << 2;
|
|
||||||
assert(getAddressingMode() == AM && "MemIndexedMode encoding error!");
|
|
||||||
InitOperands(Ops, Operands, numOperands);
|
|
||||||
assert((getOffset().getOpcode() == ISD::UNDEF || isIndexed()) &&
|
|
||||||
"Only indexed loads and stores have a non-undef offset operand");
|
|
||||||
}
|
|
||||||
LSBaseSDNode(ISD::NodeType NodeTy, DebugLoc dl, SDValue *Operands,
|
LSBaseSDNode(ISD::NodeType NodeTy, DebugLoc dl, SDValue *Operands,
|
||||||
unsigned numOperands, SDVTList VTs, ISD::MemIndexedMode AM,
|
unsigned numOperands, SDVTList VTs, ISD::MemIndexedMode AM,
|
||||||
MVT VT, const Value *SV, int SVO, unsigned Align, bool Vol)
|
MVT VT, const Value *SV, int SVO, unsigned Align, bool Vol)
|
||||||
|
@ -2411,14 +2342,6 @@ public:
|
||||||
class LoadSDNode : public LSBaseSDNode {
|
class LoadSDNode : public LSBaseSDNode {
|
||||||
protected:
|
protected:
|
||||||
friend class SelectionDAG;
|
friend class SelectionDAG;
|
||||||
LoadSDNode(SDValue *ChainPtrOff, SDVTList VTs,
|
|
||||||
ISD::MemIndexedMode AM, ISD::LoadExtType ETy, MVT LVT,
|
|
||||||
const Value *SV, int O=0, unsigned Align=0, bool Vol=false)
|
|
||||||
: LSBaseSDNode(ISD::LOAD, ChainPtrOff, 3,
|
|
||||||
VTs, AM, LVT, SV, O, Align, Vol) {
|
|
||||||
SubclassData |= (unsigned short)ETy;
|
|
||||||
assert(getExtensionType() == ETy && "LoadExtType encoding error!");
|
|
||||||
}
|
|
||||||
LoadSDNode(SDValue *ChainPtrOff, DebugLoc dl, SDVTList VTs,
|
LoadSDNode(SDValue *ChainPtrOff, DebugLoc dl, SDVTList VTs,
|
||||||
ISD::MemIndexedMode AM, ISD::LoadExtType ETy, MVT LVT,
|
ISD::MemIndexedMode AM, ISD::LoadExtType ETy, MVT LVT,
|
||||||
const Value *SV, int O=0, unsigned Align=0, bool Vol=false)
|
const Value *SV, int O=0, unsigned Align=0, bool Vol=false)
|
||||||
|
@ -2449,14 +2372,6 @@ public:
|
||||||
class StoreSDNode : public LSBaseSDNode {
|
class StoreSDNode : public LSBaseSDNode {
|
||||||
protected:
|
protected:
|
||||||
friend class SelectionDAG;
|
friend class SelectionDAG;
|
||||||
StoreSDNode(SDValue *ChainValuePtrOff, SDVTList VTs,
|
|
||||||
ISD::MemIndexedMode AM, bool isTrunc, MVT SVT,
|
|
||||||
const Value *SV, int O=0, unsigned Align=0, bool Vol=false)
|
|
||||||
: LSBaseSDNode(ISD::STORE, ChainValuePtrOff, 4,
|
|
||||||
VTs, AM, SVT, SV, O, Align, Vol) {
|
|
||||||
SubclassData |= (unsigned short)isTrunc;
|
|
||||||
assert(isTruncatingStore() == isTrunc && "isTrunc encoding error!");
|
|
||||||
}
|
|
||||||
StoreSDNode(SDValue *ChainValuePtrOff, DebugLoc dl, SDVTList VTs,
|
StoreSDNode(SDValue *ChainValuePtrOff, DebugLoc dl, SDVTList VTs,
|
||||||
ISD::MemIndexedMode AM, bool isTrunc, MVT SVT,
|
ISD::MemIndexedMode AM, bool isTrunc, MVT SVT,
|
||||||
const Value *SV, int O=0, unsigned Align=0, bool Vol=false)
|
const Value *SV, int O=0, unsigned Align=0, bool Vol=false)
|
||||||
|
|
|
@ -4832,27 +4832,6 @@ GlobalAddressSDNode::GlobalAddressSDNode(bool isTarget, const GlobalValue *GA,
|
||||||
TheGlobal = const_cast<GlobalValue*>(GA);
|
TheGlobal = const_cast<GlobalValue*>(GA);
|
||||||
}
|
}
|
||||||
|
|
||||||
MemSDNode::MemSDNode(unsigned Opc, SDVTList VTs, MVT memvt,
|
|
||||||
const Value *srcValue, int SVO,
|
|
||||||
unsigned alignment, bool vol)
|
|
||||||
: SDNode(Opc, VTs), MemoryVT(memvt), SrcValue(srcValue), SVOffset(SVO) {
|
|
||||||
SubclassData = encodeMemSDNodeFlags(0, ISD::UNINDEXED, vol, alignment);
|
|
||||||
assert(isPowerOf2_32(alignment) && "Alignment is not a power of 2!");
|
|
||||||
assert(getAlignment() == alignment && "Alignment representation error!");
|
|
||||||
assert(isVolatile() == vol && "Volatile representation error!");
|
|
||||||
}
|
|
||||||
|
|
||||||
MemSDNode::MemSDNode(unsigned Opc, SDVTList VTs, const SDValue *Ops,
|
|
||||||
unsigned NumOps, MVT memvt, const Value *srcValue,
|
|
||||||
int SVO, unsigned alignment, bool vol)
|
|
||||||
: SDNode(Opc, VTs, Ops, NumOps),
|
|
||||||
MemoryVT(memvt), SrcValue(srcValue), SVOffset(SVO) {
|
|
||||||
SubclassData = encodeMemSDNodeFlags(0, ISD::UNINDEXED, vol, alignment);
|
|
||||||
assert(isPowerOf2_32(alignment) && "Alignment is not a power of 2!");
|
|
||||||
assert(getAlignment() == alignment && "Alignment representation error!");
|
|
||||||
assert(isVolatile() == vol && "Volatile representation error!");
|
|
||||||
}
|
|
||||||
|
|
||||||
MemSDNode::MemSDNode(unsigned Opc, DebugLoc dl, SDVTList VTs, MVT memvt,
|
MemSDNode::MemSDNode(unsigned Opc, DebugLoc dl, SDVTList VTs, MVT memvt,
|
||||||
const Value *srcValue, int SVO,
|
const Value *srcValue, int SVO,
|
||||||
unsigned alignment, bool vol)
|
unsigned alignment, bool vol)
|
||||||
|
|
Loading…
Reference in New Issue