|
@@ -1,4 +1,4 @@
|
|
-//===-- llvm/CodeGen/SelectionDAGNodes.h - SelectionDAG Nodes ---*- C++ -*-===//
|
|
|
|
|
|
+//===- llvm/CodeGen/SelectionDAGNodes.h - SelectionDAG Nodes ----*- C++ -*-===//
|
|
//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
//
|
|
@@ -118,11 +118,11 @@ namespace ISD {
|
|
class SDValue {
|
|
class SDValue {
|
|
friend struct DenseMapInfo<SDValue>;
|
|
friend struct DenseMapInfo<SDValue>;
|
|
|
|
|
|
- SDNode *Node; // The node defining the value we are using.
|
|
|
|
- unsigned ResNo; // Which return value of the node we are using.
|
|
|
|
|
|
+ SDNode *Node = nullptr; // The node defining the value we are using.
|
|
|
|
+ unsigned ResNo = 0; // Which return value of the node we are using.
|
|
|
|
|
|
public:
|
|
public:
|
|
- SDValue() : Node(nullptr), ResNo(0) {}
|
|
|
|
|
|
+ SDValue() = default;
|
|
SDValue(SDNode *node, unsigned resno);
|
|
SDValue(SDNode *node, unsigned resno);
|
|
|
|
|
|
/// get the index which selects a specific result in the SDNode
|
|
/// get the index which selects a specific result in the SDNode
|
|
@@ -250,16 +250,16 @@ class SDUse {
|
|
/// Val - The value being used.
|
|
/// Val - The value being used.
|
|
SDValue Val;
|
|
SDValue Val;
|
|
/// User - The user of this value.
|
|
/// User - The user of this value.
|
|
- SDNode *User;
|
|
|
|
|
|
+ SDNode *User = nullptr;
|
|
/// Prev, Next - Pointers to the uses list of the SDNode referred by
|
|
/// Prev, Next - Pointers to the uses list of the SDNode referred by
|
|
/// this operand.
|
|
/// this operand.
|
|
- SDUse **Prev, *Next;
|
|
|
|
-
|
|
|
|
- SDUse(const SDUse &U) = delete;
|
|
|
|
- void operator=(const SDUse &U) = delete;
|
|
|
|
|
|
+ SDUse **Prev = nullptr;
|
|
|
|
+ SDUse *Next = nullptr;
|
|
|
|
|
|
public:
|
|
public:
|
|
- SDUse() : User(nullptr), Prev(nullptr), Next(nullptr) {}
|
|
|
|
|
|
+ SDUse() = default;
|
|
|
|
+ SDUse(const SDUse &U) = delete;
|
|
|
|
+ SDUse &operator=(const SDUse &) = delete;
|
|
|
|
|
|
/// Normally SDUse will just implicitly convert to an SDValue that it holds.
|
|
/// Normally SDUse will just implicitly convert to an SDValue that it holds.
|
|
operator const SDValue&() const { return Val; }
|
|
operator const SDValue&() const { return Val; }
|
|
@@ -353,17 +353,10 @@ private:
|
|
|
|
|
|
public:
|
|
public:
|
|
/// Default constructor turns off all optimization flags.
|
|
/// Default constructor turns off all optimization flags.
|
|
- SDNodeFlags() {
|
|
|
|
- NoUnsignedWrap = false;
|
|
|
|
- NoSignedWrap = false;
|
|
|
|
- Exact = false;
|
|
|
|
- UnsafeAlgebra = false;
|
|
|
|
- NoNaNs = false;
|
|
|
|
- NoInfs = false;
|
|
|
|
- NoSignedZeros = false;
|
|
|
|
- AllowReciprocal = false;
|
|
|
|
- VectorReduction = false;
|
|
|
|
- }
|
|
|
|
|
|
+ SDNodeFlags()
|
|
|
|
+ : NoUnsignedWrap(false), NoSignedWrap(false), Exact(false),
|
|
|
|
+ UnsafeAlgebra(false), NoNaNs(false), NoInfs(false),
|
|
|
|
+ NoSignedZeros(false), AllowReciprocal(false), VectorReduction(false) {}
|
|
|
|
|
|
// These are mutators for each flag.
|
|
// These are mutators for each flag.
|
|
void setNoUnsignedWrap(bool b) { NoUnsignedWrap = b; }
|
|
void setNoUnsignedWrap(bool b) { NoUnsignedWrap = b; }
|
|
@@ -446,6 +439,7 @@ protected:
|
|
|
|
|
|
class LSBaseSDNodeBitfields {
|
|
class LSBaseSDNodeBitfields {
|
|
friend class LSBaseSDNode;
|
|
friend class LSBaseSDNode;
|
|
|
|
+
|
|
uint16_t : NumMemSDNodeBits;
|
|
uint16_t : NumMemSDNodeBits;
|
|
|
|
|
|
uint16_t AddressingMode : 3; // enum ISD::MemIndexedMode
|
|
uint16_t AddressingMode : 3; // enum ISD::MemIndexedMode
|
|
@@ -493,21 +487,26 @@ protected:
|
|
static_assert(sizeof(StoreSDNodeBitfields) <= 2, "field too wide");
|
|
static_assert(sizeof(StoreSDNodeBitfields) <= 2, "field too wide");
|
|
|
|
|
|
private:
|
|
private:
|
|
|
|
+ friend class SelectionDAG;
|
|
|
|
+ // TODO: unfriend HandleSDNode once we fix its operand handling.
|
|
|
|
+ friend class HandleSDNode;
|
|
|
|
+
|
|
/// Unique id per SDNode in the DAG.
|
|
/// Unique id per SDNode in the DAG.
|
|
- int NodeId;
|
|
|
|
|
|
+ int NodeId = -1;
|
|
|
|
|
|
/// The values that are used by this operation.
|
|
/// The values that are used by this operation.
|
|
- SDUse *OperandList;
|
|
|
|
|
|
+ SDUse *OperandList = nullptr;
|
|
|
|
|
|
/// The types of the values this node defines. SDNode's may
|
|
/// The types of the values this node defines. SDNode's may
|
|
/// define multiple values simultaneously.
|
|
/// define multiple values simultaneously.
|
|
const EVT *ValueList;
|
|
const EVT *ValueList;
|
|
|
|
|
|
/// List of uses for this SDNode.
|
|
/// List of uses for this SDNode.
|
|
- SDUse *UseList;
|
|
|
|
|
|
+ SDUse *UseList = nullptr;
|
|
|
|
|
|
/// The number of entries in the Operand/Value list.
|
|
/// The number of entries in the Operand/Value list.
|
|
- unsigned short NumOperands, NumValues;
|
|
|
|
|
|
+ unsigned short NumOperands = 0;
|
|
|
|
+ unsigned short NumValues;
|
|
|
|
|
|
// The ordering of the SDNodes. It roughly corresponds to the ordering of the
|
|
// The ordering of the SDNodes. It roughly corresponds to the ordering of the
|
|
// original LLVM instructions.
|
|
// original LLVM instructions.
|
|
@@ -522,10 +521,6 @@ private:
|
|
/// Return a pointer to the specified value type.
|
|
/// Return a pointer to the specified value type.
|
|
static const EVT *getValueTypeList(EVT VT);
|
|
static const EVT *getValueTypeList(EVT VT);
|
|
|
|
|
|
- friend class SelectionDAG;
|
|
|
|
- // TODO: unfriend HandleSDNode once we fix its operand handling.
|
|
|
|
- friend class HandleSDNode;
|
|
|
|
-
|
|
|
|
public:
|
|
public:
|
|
/// Unique and persistent id per SDNode in the DAG.
|
|
/// Unique and persistent id per SDNode in the DAG.
|
|
/// Used for debug printing.
|
|
/// Used for debug printing.
|
|
@@ -616,10 +611,10 @@ public:
|
|
/// operands that use a specific SDNode.
|
|
/// operands that use a specific SDNode.
|
|
class use_iterator
|
|
class use_iterator
|
|
: public std::iterator<std::forward_iterator_tag, SDUse, ptrdiff_t> {
|
|
: public std::iterator<std::forward_iterator_tag, SDUse, ptrdiff_t> {
|
|
- SDUse *Op;
|
|
|
|
-
|
|
|
|
friend class SDNode;
|
|
friend class SDNode;
|
|
|
|
|
|
|
|
+ SDUse *Op = nullptr;
|
|
|
|
+
|
|
explicit use_iterator(SDUse *op) : Op(op) {}
|
|
explicit use_iterator(SDUse *op) : Op(op) {}
|
|
|
|
|
|
public:
|
|
public:
|
|
@@ -628,8 +623,8 @@ public:
|
|
typedef std::iterator<std::forward_iterator_tag,
|
|
typedef std::iterator<std::forward_iterator_tag,
|
|
SDUse, ptrdiff_t>::pointer pointer;
|
|
SDUse, ptrdiff_t>::pointer pointer;
|
|
|
|
|
|
|
|
+ use_iterator() = default;
|
|
use_iterator(const use_iterator &I) : Op(I.Op) {}
|
|
use_iterator(const use_iterator &I) : Op(I.Op) {}
|
|
- use_iterator() : Op(nullptr) {}
|
|
|
|
|
|
|
|
bool operator==(const use_iterator &x) const {
|
|
bool operator==(const use_iterator &x) const {
|
|
return Op == x.Op;
|
|
return Op == x.Op;
|
|
@@ -900,9 +895,8 @@ protected:
|
|
/// SDNodes are created without any operands, and never own the operand
|
|
/// SDNodes are created without any operands, and never own the operand
|
|
/// storage. To add operands, see SelectionDAG::createOperands.
|
|
/// storage. To add operands, see SelectionDAG::createOperands.
|
|
SDNode(unsigned Opc, unsigned Order, DebugLoc dl, SDVTList VTs)
|
|
SDNode(unsigned Opc, unsigned Order, DebugLoc dl, SDVTList VTs)
|
|
- : NodeType(Opc), NodeId(-1), OperandList(nullptr), ValueList(VTs.VTs),
|
|
|
|
- UseList(nullptr), NumOperands(0), NumValues(VTs.NumVTs), IROrder(Order),
|
|
|
|
- debugLoc(std::move(dl)) {
|
|
|
|
|
|
+ : NodeType(Opc), ValueList(VTs.VTs), NumValues(VTs.NumVTs),
|
|
|
|
+ IROrder(Order), debugLoc(std::move(dl)) {
|
|
memset(&RawSDNodeBits, 0, sizeof(RawSDNodeBits));
|
|
memset(&RawSDNodeBits, 0, sizeof(RawSDNodeBits));
|
|
assert(debugLoc.hasTrivialDestructor() && "Expected trivial destructor");
|
|
assert(debugLoc.hasTrivialDestructor() && "Expected trivial destructor");
|
|
assert(NumValues == VTs.NumVTs &&
|
|
assert(NumValues == VTs.NumVTs &&
|
|
@@ -1370,10 +1364,10 @@ public:
|
|
};
|
|
};
|
|
|
|
|
|
class ConstantSDNode : public SDNode {
|
|
class ConstantSDNode : public SDNode {
|
|
- const ConstantInt *Value;
|
|
|
|
-
|
|
|
|
friend class SelectionDAG;
|
|
friend class SelectionDAG;
|
|
|
|
|
|
|
|
+ const ConstantInt *Value;
|
|
|
|
+
|
|
ConstantSDNode(bool isTarget, bool isOpaque, const ConstantInt *val,
|
|
ConstantSDNode(bool isTarget, bool isOpaque, const ConstantInt *val,
|
|
const DebugLoc &DL, EVT VT)
|
|
const DebugLoc &DL, EVT VT)
|
|
: SDNode(isTarget ? ISD::TargetConstant : ISD::Constant, 0, DL,
|
|
: SDNode(isTarget ? ISD::TargetConstant : ISD::Constant, 0, DL,
|
|
@@ -1405,10 +1399,10 @@ uint64_t SDNode::getConstantOperandVal(unsigned Num) const {
|
|
}
|
|
}
|
|
|
|
|
|
class ConstantFPSDNode : public SDNode {
|
|
class ConstantFPSDNode : public SDNode {
|
|
- const ConstantFP *Value;
|
|
|
|
-
|
|
|
|
friend class SelectionDAG;
|
|
friend class SelectionDAG;
|
|
|
|
|
|
|
|
+ const ConstantFP *Value;
|
|
|
|
+
|
|
ConstantFPSDNode(bool isTarget, const ConstantFP *val, const DebugLoc &DL,
|
|
ConstantFPSDNode(bool isTarget, const ConstantFP *val, const DebugLoc &DL,
|
|
EVT VT)
|
|
EVT VT)
|
|
: SDNode(isTarget ? ISD::TargetConstantFP : ISD::ConstantFP, 0, DL,
|
|
: SDNode(isTarget ? ISD::TargetConstantFP : ISD::ConstantFP, 0, DL,
|
|
@@ -1479,10 +1473,12 @@ ConstantSDNode *isConstOrConstSplat(SDValue V);
|
|
ConstantFPSDNode *isConstOrConstSplatFP(SDValue V);
|
|
ConstantFPSDNode *isConstOrConstSplatFP(SDValue V);
|
|
|
|
|
|
class GlobalAddressSDNode : public SDNode {
|
|
class GlobalAddressSDNode : public SDNode {
|
|
|
|
+ friend class SelectionDAG;
|
|
|
|
+
|
|
const GlobalValue *TheGlobal;
|
|
const GlobalValue *TheGlobal;
|
|
int64_t Offset;
|
|
int64_t Offset;
|
|
unsigned char TargetFlags;
|
|
unsigned char TargetFlags;
|
|
- friend class SelectionDAG;
|
|
|
|
|
|
+
|
|
GlobalAddressSDNode(unsigned Opc, unsigned Order, const DebugLoc &DL,
|
|
GlobalAddressSDNode(unsigned Opc, unsigned Order, const DebugLoc &DL,
|
|
const GlobalValue *GA, EVT VT, int64_t o,
|
|
const GlobalValue *GA, EVT VT, int64_t o,
|
|
unsigned char TargetFlags);
|
|
unsigned char TargetFlags);
|
|
@@ -1503,10 +1499,10 @@ public:
|
|
};
|
|
};
|
|
|
|
|
|
class FrameIndexSDNode : public SDNode {
|
|
class FrameIndexSDNode : public SDNode {
|
|
- int FI;
|
|
|
|
-
|
|
|
|
friend class SelectionDAG;
|
|
friend class SelectionDAG;
|
|
|
|
|
|
|
|
+ int FI;
|
|
|
|
+
|
|
FrameIndexSDNode(int fi, EVT VT, bool isTarg)
|
|
FrameIndexSDNode(int fi, EVT VT, bool isTarg)
|
|
: SDNode(isTarg ? ISD::TargetFrameIndex : ISD::FrameIndex,
|
|
: SDNode(isTarg ? ISD::TargetFrameIndex : ISD::FrameIndex,
|
|
0, DebugLoc(), getSDVTList(VT)), FI(fi) {
|
|
0, DebugLoc(), getSDVTList(VT)), FI(fi) {
|
|
@@ -1522,11 +1518,11 @@ public:
|
|
};
|
|
};
|
|
|
|
|
|
class JumpTableSDNode : public SDNode {
|
|
class JumpTableSDNode : public SDNode {
|
|
|
|
+ friend class SelectionDAG;
|
|
|
|
+
|
|
int JTI;
|
|
int JTI;
|
|
unsigned char TargetFlags;
|
|
unsigned char TargetFlags;
|
|
|
|
|
|
- friend class SelectionDAG;
|
|
|
|
-
|
|
|
|
JumpTableSDNode(int jti, EVT VT, bool isTarg, unsigned char TF)
|
|
JumpTableSDNode(int jti, EVT VT, bool isTarg, unsigned char TF)
|
|
: SDNode(isTarg ? ISD::TargetJumpTable : ISD::JumpTable,
|
|
: SDNode(isTarg ? ISD::TargetJumpTable : ISD::JumpTable,
|
|
0, DebugLoc(), getSDVTList(VT)), JTI(jti), TargetFlags(TF) {
|
|
0, DebugLoc(), getSDVTList(VT)), JTI(jti), TargetFlags(TF) {
|
|
@@ -1543,6 +1539,8 @@ public:
|
|
};
|
|
};
|
|
|
|
|
|
class ConstantPoolSDNode : public SDNode {
|
|
class ConstantPoolSDNode : public SDNode {
|
|
|
|
+ friend class SelectionDAG;
|
|
|
|
+
|
|
union {
|
|
union {
|
|
const Constant *ConstVal;
|
|
const Constant *ConstVal;
|
|
MachineConstantPoolValue *MachineCPVal;
|
|
MachineConstantPoolValue *MachineCPVal;
|
|
@@ -1551,8 +1549,6 @@ class ConstantPoolSDNode : public SDNode {
|
|
unsigned Alignment; // Minimum alignment requirement of CP (not log2 value).
|
|
unsigned Alignment; // Minimum alignment requirement of CP (not log2 value).
|
|
unsigned char TargetFlags;
|
|
unsigned char TargetFlags;
|
|
|
|
|
|
- friend class SelectionDAG;
|
|
|
|
-
|
|
|
|
ConstantPoolSDNode(bool isTarget, const Constant *c, EVT VT, int o,
|
|
ConstantPoolSDNode(bool isTarget, const Constant *c, EVT VT, int o,
|
|
unsigned Align, unsigned char TF)
|
|
unsigned Align, unsigned char TF)
|
|
: SDNode(isTarget ? ISD::TargetConstantPool : ISD::ConstantPool, 0,
|
|
: SDNode(isTarget ? ISD::TargetConstantPool : ISD::ConstantPool, 0,
|
|
@@ -1606,12 +1602,12 @@ public:
|
|
|
|
|
|
/// Completely target-dependent object reference.
|
|
/// Completely target-dependent object reference.
|
|
class TargetIndexSDNode : public SDNode {
|
|
class TargetIndexSDNode : public SDNode {
|
|
|
|
+ friend class SelectionDAG;
|
|
|
|
+
|
|
unsigned char TargetFlags;
|
|
unsigned char TargetFlags;
|
|
int Index;
|
|
int Index;
|
|
int64_t Offset;
|
|
int64_t Offset;
|
|
|
|
|
|
- friend class SelectionDAG;
|
|
|
|
-
|
|
|
|
public:
|
|
public:
|
|
TargetIndexSDNode(int Idx, EVT VT, int64_t Ofs, unsigned char TF)
|
|
TargetIndexSDNode(int Idx, EVT VT, int64_t Ofs, unsigned char TF)
|
|
: SDNode(ISD::TargetIndex, 0, DebugLoc(), getSDVTList(VT)),
|
|
: SDNode(ISD::TargetIndex, 0, DebugLoc(), getSDVTList(VT)),
|
|
@@ -1627,10 +1623,10 @@ public:
|
|
};
|
|
};
|
|
|
|
|
|
class BasicBlockSDNode : public SDNode {
|
|
class BasicBlockSDNode : public SDNode {
|
|
- MachineBasicBlock *MBB;
|
|
|
|
-
|
|
|
|
friend class SelectionDAG;
|
|
friend class SelectionDAG;
|
|
|
|
|
|
|
|
+ MachineBasicBlock *MBB;
|
|
|
|
+
|
|
/// Debug info is meaningful and potentially useful here, but we create
|
|
/// Debug info is meaningful and potentially useful here, but we create
|
|
/// blocks out of order when they're jumped to, which makes it a bit
|
|
/// blocks out of order when they're jumped to, which makes it a bit
|
|
/// harder. Let's see if we need it first.
|
|
/// harder. Let's see if we need it first.
|
|
@@ -1648,10 +1644,10 @@ public:
|
|
|
|
|
|
/// A "pseudo-class" with methods for operating on BUILD_VECTORs.
|
|
/// A "pseudo-class" with methods for operating on BUILD_VECTORs.
|
|
class BuildVectorSDNode : public SDNode {
|
|
class BuildVectorSDNode : public SDNode {
|
|
|
|
+public:
|
|
// These are constructed as SDNodes and then cast to BuildVectorSDNodes.
|
|
// These are constructed as SDNodes and then cast to BuildVectorSDNodes.
|
|
explicit BuildVectorSDNode() = delete;
|
|
explicit BuildVectorSDNode() = delete;
|
|
|
|
|
|
-public:
|
|
|
|
/// Check if this is a constant splat, and if so, find the
|
|
/// Check if this is a constant splat, and if so, find the
|
|
/// smallest element size that splats the vector. If MinSplatBits is
|
|
/// smallest element size that splats the vector. If MinSplatBits is
|
|
/// nonzero, the element size must be at least that large. Note that the
|
|
/// nonzero, the element size must be at least that large. Note that the
|
|
@@ -1708,10 +1704,10 @@ public:
|
|
/// in the LLVM IR representation.
|
|
/// in the LLVM IR representation.
|
|
///
|
|
///
|
|
class SrcValueSDNode : public SDNode {
|
|
class SrcValueSDNode : public SDNode {
|
|
- const Value *V;
|
|
|
|
-
|
|
|
|
friend class SelectionDAG;
|
|
friend class SelectionDAG;
|
|
|
|
|
|
|
|
+ const Value *V;
|
|
|
|
+
|
|
/// Create a SrcValue for a general value.
|
|
/// Create a SrcValue for a general value.
|
|
explicit SrcValueSDNode(const Value *v)
|
|
explicit SrcValueSDNode(const Value *v)
|
|
: SDNode(ISD::SRCVALUE, 0, DebugLoc(), getSDVTList(MVT::Other)), V(v) {}
|
|
: SDNode(ISD::SRCVALUE, 0, DebugLoc(), getSDVTList(MVT::Other)), V(v) {}
|
|
@@ -1726,10 +1722,10 @@ public:
|
|
};
|
|
};
|
|
|
|
|
|
class MDNodeSDNode : public SDNode {
|
|
class MDNodeSDNode : public SDNode {
|
|
- const MDNode *MD;
|
|
|
|
-
|
|
|
|
friend class SelectionDAG;
|
|
friend class SelectionDAG;
|
|
|
|
|
|
|
|
+ const MDNode *MD;
|
|
|
|
+
|
|
explicit MDNodeSDNode(const MDNode *md)
|
|
explicit MDNodeSDNode(const MDNode *md)
|
|
: SDNode(ISD::MDNODE_SDNODE, 0, DebugLoc(), getSDVTList(MVT::Other)), MD(md)
|
|
: SDNode(ISD::MDNODE_SDNODE, 0, DebugLoc(), getSDVTList(MVT::Other)), MD(md)
|
|
{}
|
|
{}
|
|
@@ -1743,10 +1739,10 @@ public:
|
|
};
|
|
};
|
|
|
|
|
|
class RegisterSDNode : public SDNode {
|
|
class RegisterSDNode : public SDNode {
|
|
- unsigned Reg;
|
|
|
|
-
|
|
|
|
friend class SelectionDAG;
|
|
friend class SelectionDAG;
|
|
|
|
|
|
|
|
+ unsigned Reg;
|
|
|
|
+
|
|
RegisterSDNode(unsigned reg, EVT VT)
|
|
RegisterSDNode(unsigned reg, EVT VT)
|
|
: SDNode(ISD::Register, 0, DebugLoc(), getSDVTList(VT)), Reg(reg) {}
|
|
: SDNode(ISD::Register, 0, DebugLoc(), getSDVTList(VT)), Reg(reg) {}
|
|
|
|
|
|
@@ -1759,11 +1755,11 @@ public:
|
|
};
|
|
};
|
|
|
|
|
|
class RegisterMaskSDNode : public SDNode {
|
|
class RegisterMaskSDNode : public SDNode {
|
|
|
|
+ friend class SelectionDAG;
|
|
|
|
+
|
|
// The memory for RegMask is not owned by the node.
|
|
// The memory for RegMask is not owned by the node.
|
|
const uint32_t *RegMask;
|
|
const uint32_t *RegMask;
|
|
|
|
|
|
- friend class SelectionDAG;
|
|
|
|
-
|
|
|
|
RegisterMaskSDNode(const uint32_t *mask)
|
|
RegisterMaskSDNode(const uint32_t *mask)
|
|
: SDNode(ISD::RegisterMask, 0, DebugLoc(), getSDVTList(MVT::Untyped)),
|
|
: SDNode(ISD::RegisterMask, 0, DebugLoc(), getSDVTList(MVT::Untyped)),
|
|
RegMask(mask) {}
|
|
RegMask(mask) {}
|
|
@@ -1777,12 +1773,12 @@ public:
|
|
};
|
|
};
|
|
|
|
|
|
class BlockAddressSDNode : public SDNode {
|
|
class BlockAddressSDNode : public SDNode {
|
|
|
|
+ friend class SelectionDAG;
|
|
|
|
+
|
|
const BlockAddress *BA;
|
|
const BlockAddress *BA;
|
|
int64_t Offset;
|
|
int64_t Offset;
|
|
unsigned char TargetFlags;
|
|
unsigned char TargetFlags;
|
|
|
|
|
|
- friend class SelectionDAG;
|
|
|
|
-
|
|
|
|
BlockAddressSDNode(unsigned NodeTy, EVT VT, const BlockAddress *ba,
|
|
BlockAddressSDNode(unsigned NodeTy, EVT VT, const BlockAddress *ba,
|
|
int64_t o, unsigned char Flags)
|
|
int64_t o, unsigned char Flags)
|
|
: SDNode(NodeTy, 0, DebugLoc(), getSDVTList(VT)),
|
|
: SDNode(NodeTy, 0, DebugLoc(), getSDVTList(VT)),
|
|
@@ -1801,10 +1797,10 @@ public:
|
|
};
|
|
};
|
|
|
|
|
|
class EHLabelSDNode : public SDNode {
|
|
class EHLabelSDNode : public SDNode {
|
|
- MCSymbol *Label;
|
|
|
|
-
|
|
|
|
friend class SelectionDAG;
|
|
friend class SelectionDAG;
|
|
|
|
|
|
|
|
+ MCSymbol *Label;
|
|
|
|
+
|
|
EHLabelSDNode(unsigned Order, const DebugLoc &dl, MCSymbol *L)
|
|
EHLabelSDNode(unsigned Order, const DebugLoc &dl, MCSymbol *L)
|
|
: SDNode(ISD::EH_LABEL, Order, dl, getSDVTList(MVT::Other)), Label(L) {}
|
|
: SDNode(ISD::EH_LABEL, Order, dl, getSDVTList(MVT::Other)), Label(L) {}
|
|
|
|
|
|
@@ -1817,11 +1813,11 @@ public:
|
|
};
|
|
};
|
|
|
|
|
|
class ExternalSymbolSDNode : public SDNode {
|
|
class ExternalSymbolSDNode : public SDNode {
|
|
|
|
+ friend class SelectionDAG;
|
|
|
|
+
|
|
const char *Symbol;
|
|
const char *Symbol;
|
|
unsigned char TargetFlags;
|
|
unsigned char TargetFlags;
|
|
|
|
|
|
- friend class SelectionDAG;
|
|
|
|
-
|
|
|
|
ExternalSymbolSDNode(bool isTarget, const char *Sym, unsigned char TF, EVT VT)
|
|
ExternalSymbolSDNode(bool isTarget, const char *Sym, unsigned char TF, EVT VT)
|
|
: SDNode(isTarget ? ISD::TargetExternalSymbol : ISD::ExternalSymbol,
|
|
: SDNode(isTarget ? ISD::TargetExternalSymbol : ISD::ExternalSymbol,
|
|
0, DebugLoc(), getSDVTList(VT)), Symbol(Sym), TargetFlags(TF) {}
|
|
0, DebugLoc(), getSDVTList(VT)), Symbol(Sym), TargetFlags(TF) {}
|
|
@@ -1837,9 +1833,10 @@ public:
|
|
};
|
|
};
|
|
|
|
|
|
class MCSymbolSDNode : public SDNode {
|
|
class MCSymbolSDNode : public SDNode {
|
|
|
|
+ friend class SelectionDAG;
|
|
|
|
+
|
|
MCSymbol *Symbol;
|
|
MCSymbol *Symbol;
|
|
|
|
|
|
- friend class SelectionDAG;
|
|
|
|
MCSymbolSDNode(MCSymbol *Symbol, EVT VT)
|
|
MCSymbolSDNode(MCSymbol *Symbol, EVT VT)
|
|
: SDNode(ISD::MCSymbol, 0, DebugLoc(), getSDVTList(VT)), Symbol(Symbol) {}
|
|
: SDNode(ISD::MCSymbol, 0, DebugLoc(), getSDVTList(VT)), Symbol(Symbol) {}
|
|
|
|
|
|
@@ -1852,10 +1849,10 @@ public:
|
|
};
|
|
};
|
|
|
|
|
|
class CondCodeSDNode : public SDNode {
|
|
class CondCodeSDNode : public SDNode {
|
|
- ISD::CondCode Condition;
|
|
|
|
-
|
|
|
|
friend class SelectionDAG;
|
|
friend class SelectionDAG;
|
|
|
|
|
|
|
|
+ ISD::CondCode Condition;
|
|
|
|
+
|
|
explicit CondCodeSDNode(ISD::CondCode Cond)
|
|
explicit CondCodeSDNode(ISD::CondCode Cond)
|
|
: SDNode(ISD::CONDCODE, 0, DebugLoc(), getSDVTList(MVT::Other)),
|
|
: SDNode(ISD::CONDCODE, 0, DebugLoc(), getSDVTList(MVT::Other)),
|
|
Condition(Cond) {}
|
|
Condition(Cond) {}
|
|
@@ -1871,10 +1868,10 @@ public:
|
|
/// This class is used to represent EVT's, which are used
|
|
/// This class is used to represent EVT's, which are used
|
|
/// to parameterize some operations.
|
|
/// to parameterize some operations.
|
|
class VTSDNode : public SDNode {
|
|
class VTSDNode : public SDNode {
|
|
- EVT ValueType;
|
|
|
|
-
|
|
|
|
friend class SelectionDAG;
|
|
friend class SelectionDAG;
|
|
|
|
|
|
|
|
+ EVT ValueType;
|
|
|
|
+
|
|
explicit VTSDNode(EVT VT)
|
|
explicit VTSDNode(EVT VT)
|
|
: SDNode(ISD::VALUETYPE, 0, DebugLoc(), getSDVTList(MVT::Other)),
|
|
: SDNode(ISD::VALUETYPE, 0, DebugLoc(), getSDVTList(MVT::Other)),
|
|
ValueType(VT) {}
|
|
ValueType(VT) {}
|
|
@@ -2003,6 +2000,7 @@ public:
|
|
class MaskedLoadSDNode : public MaskedLoadStoreSDNode {
|
|
class MaskedLoadSDNode : public MaskedLoadStoreSDNode {
|
|
public:
|
|
public:
|
|
friend class SelectionDAG;
|
|
friend class SelectionDAG;
|
|
|
|
+
|
|
MaskedLoadSDNode(unsigned Order, const DebugLoc &dl, SDVTList VTs,
|
|
MaskedLoadSDNode(unsigned Order, const DebugLoc &dl, SDVTList VTs,
|
|
ISD::LoadExtType ETy, bool IsExpanding, EVT MemVT,
|
|
ISD::LoadExtType ETy, bool IsExpanding, EVT MemVT,
|
|
MachineMemOperand *MMO)
|
|
MachineMemOperand *MMO)
|
|
@@ -2122,11 +2120,11 @@ private:
|
|
friend class SelectionDAG;
|
|
friend class SelectionDAG;
|
|
|
|
|
|
MachineSDNode(unsigned Opc, unsigned Order, const DebugLoc &DL, SDVTList VTs)
|
|
MachineSDNode(unsigned Opc, unsigned Order, const DebugLoc &DL, SDVTList VTs)
|
|
- : SDNode(Opc, Order, DL, VTs), MemRefs(nullptr), MemRefsEnd(nullptr) {}
|
|
|
|
|
|
+ : SDNode(Opc, Order, DL, VTs) {}
|
|
|
|
|
|
/// Memory reference descriptions for this instruction.
|
|
/// Memory reference descriptions for this instruction.
|
|
- mmo_iterator MemRefs;
|
|
|
|
- mmo_iterator MemRefsEnd;
|
|
|
|
|
|
+ mmo_iterator MemRefs = nullptr;
|
|
|
|
+ mmo_iterator MemRefsEnd = nullptr;
|
|
|
|
|
|
public:
|
|
public:
|
|
mmo_iterator memoperands_begin() const { return MemRefs; }
|
|
mmo_iterator memoperands_begin() const { return MemRefs; }
|
|
@@ -2192,9 +2190,11 @@ template <> struct GraphTraits<SDNode*> {
|
|
typedef SDNodeIterator ChildIteratorType;
|
|
typedef SDNodeIterator ChildIteratorType;
|
|
|
|
|
|
static NodeRef getEntryNode(SDNode *N) { return N; }
|
|
static NodeRef getEntryNode(SDNode *N) { return N; }
|
|
|
|
+
|
|
static ChildIteratorType child_begin(NodeRef N) {
|
|
static ChildIteratorType child_begin(NodeRef N) {
|
|
return SDNodeIterator::begin(N);
|
|
return SDNodeIterator::begin(N);
|
|
}
|
|
}
|
|
|
|
+
|
|
static ChildIteratorType child_end(NodeRef N) {
|
|
static ChildIteratorType child_end(NodeRef N) {
|
|
return SDNodeIterator::end(N);
|
|
return SDNodeIterator::end(N);
|
|
}
|
|
}
|