1
0
mirror of https://github.com/c64scene-ar/llvm-6502.git synced 2024-12-29 10:32:47 +00:00

Give each selectiondag node class a home for it's vtable and rtti info

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33866 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2007-02-04 02:23:32 +00:00
parent 73a7d89468
commit c76e3c8602
2 changed files with 35 additions and 2 deletions
include/llvm/CodeGen
lib/CodeGen/SelectionDAG

View File

@ -1080,6 +1080,7 @@ inline bool SDOperand::hasOneUse() const {
/// operand. This node should be directly created by end-users and not added to /// operand. This node should be directly created by end-users and not added to
/// the AllNodes list. /// the AllNodes list.
class HandleSDNode : public SDNode { class HandleSDNode : public SDNode {
virtual void ANCHOR(); // Out-of-line virtual method to give class a home.
public: public:
HandleSDNode(SDOperand X) : SDNode(ISD::HANDLENODE, X) {} HandleSDNode(SDOperand X) : SDNode(ISD::HANDLENODE, X) {}
~HandleSDNode() { ~HandleSDNode() {
@ -1091,6 +1092,7 @@ public:
class StringSDNode : public SDNode { class StringSDNode : public SDNode {
std::string Value; std::string Value;
virtual void ANCHOR(); // Out-of-line virtual method to give class a home.
protected: protected:
friend class SelectionDAG; friend class SelectionDAG;
StringSDNode(const std::string &val) StringSDNode(const std::string &val)
@ -1106,6 +1108,7 @@ public:
class ConstantSDNode : public SDNode { class ConstantSDNode : public SDNode {
uint64_t Value; uint64_t Value;
virtual void ANCHOR(); // Out-of-line virtual method to give class a home.
protected: protected:
friend class SelectionDAG; friend class SelectionDAG;
ConstantSDNode(bool isTarget, uint64_t val, MVT::ValueType VT) ConstantSDNode(bool isTarget, uint64_t val, MVT::ValueType VT)
@ -1134,6 +1137,7 @@ public:
class ConstantFPSDNode : public SDNode { class ConstantFPSDNode : public SDNode {
double Value; double Value;
virtual void ANCHOR(); // Out-of-line virtual method to give class a home.
protected: protected:
friend class SelectionDAG; friend class SelectionDAG;
ConstantFPSDNode(bool isTarget, double val, MVT::ValueType VT) ConstantFPSDNode(bool isTarget, double val, MVT::ValueType VT)
@ -1160,6 +1164,7 @@ public:
class GlobalAddressSDNode : public SDNode { class GlobalAddressSDNode : public SDNode {
GlobalValue *TheGlobal; GlobalValue *TheGlobal;
int Offset; int Offset;
virtual void ANCHOR(); // Out-of-line virtual method to give class a home.
protected: protected:
friend class SelectionDAG; friend class SelectionDAG;
GlobalAddressSDNode(bool isTarget, const GlobalValue *GA, MVT::ValueType VT, GlobalAddressSDNode(bool isTarget, const GlobalValue *GA, MVT::ValueType VT,
@ -1183,6 +1188,7 @@ public:
class FrameIndexSDNode : public SDNode { class FrameIndexSDNode : public SDNode {
int FI; int FI;
virtual void ANCHOR(); // Out-of-line virtual method to give class a home.
protected: protected:
friend class SelectionDAG; friend class SelectionDAG;
FrameIndexSDNode(int fi, MVT::ValueType VT, bool isTarg) FrameIndexSDNode(int fi, MVT::ValueType VT, bool isTarg)
@ -1200,6 +1206,7 @@ public:
class JumpTableSDNode : public SDNode { class JumpTableSDNode : public SDNode {
int JTI; int JTI;
virtual void ANCHOR(); // Out-of-line virtual method to give class a home.
protected: protected:
friend class SelectionDAG; friend class SelectionDAG;
JumpTableSDNode(int jti, MVT::ValueType VT, bool isTarg) JumpTableSDNode(int jti, MVT::ValueType VT, bool isTarg)
@ -1223,6 +1230,7 @@ class ConstantPoolSDNode : public SDNode {
} Val; } Val;
int Offset; // It's a MachineConstantPoolValue if top bit is set. int Offset; // It's a MachineConstantPoolValue if top bit is set.
unsigned Alignment; unsigned Alignment;
virtual void ANCHOR(); // Out-of-line virtual method to give class a home.
protected: protected:
friend class SelectionDAG; friend class SelectionDAG;
ConstantPoolSDNode(bool isTarget, Constant *c, MVT::ValueType VT, ConstantPoolSDNode(bool isTarget, Constant *c, MVT::ValueType VT,
@ -1290,6 +1298,7 @@ public:
class BasicBlockSDNode : public SDNode { class BasicBlockSDNode : public SDNode {
MachineBasicBlock *MBB; MachineBasicBlock *MBB;
virtual void ANCHOR(); // Out-of-line virtual method to give class a home.
protected: protected:
friend class SelectionDAG; friend class SelectionDAG;
BasicBlockSDNode(MachineBasicBlock *mbb) BasicBlockSDNode(MachineBasicBlock *mbb)
@ -1307,6 +1316,7 @@ public:
class SrcValueSDNode : public SDNode { class SrcValueSDNode : public SDNode {
const Value *V; const Value *V;
int offset; int offset;
virtual void ANCHOR(); // Out-of-line virtual method to give class a home.
protected: protected:
friend class SelectionDAG; friend class SelectionDAG;
SrcValueSDNode(const Value* v, int o) SrcValueSDNode(const Value* v, int o)
@ -1325,6 +1335,7 @@ public:
class RegisterSDNode : public SDNode { class RegisterSDNode : public SDNode {
unsigned Reg; unsigned Reg;
virtual void ANCHOR(); // Out-of-line virtual method to give class a home.
protected: protected:
friend class SelectionDAG; friend class SelectionDAG;
RegisterSDNode(unsigned reg, MVT::ValueType VT) RegisterSDNode(unsigned reg, MVT::ValueType VT)
@ -1341,6 +1352,7 @@ public:
class ExternalSymbolSDNode : public SDNode { class ExternalSymbolSDNode : public SDNode {
const char *Symbol; const char *Symbol;
virtual void ANCHOR(); // Out-of-line virtual method to give class a home.
protected: protected:
friend class SelectionDAG; friend class SelectionDAG;
ExternalSymbolSDNode(bool isTarget, const char *Sym, MVT::ValueType VT) ExternalSymbolSDNode(bool isTarget, const char *Sym, MVT::ValueType VT)
@ -1360,6 +1372,7 @@ public:
class CondCodeSDNode : public SDNode { class CondCodeSDNode : public SDNode {
ISD::CondCode Condition; ISD::CondCode Condition;
virtual void ANCHOR(); // Out-of-line virtual method to give class a home.
protected: protected:
friend class SelectionDAG; friend class SelectionDAG;
CondCodeSDNode(ISD::CondCode Cond) CondCodeSDNode(ISD::CondCode Cond)
@ -1379,6 +1392,7 @@ public:
/// to parameterize some operations. /// to parameterize some operations.
class VTSDNode : public SDNode { class VTSDNode : public SDNode {
MVT::ValueType ValueType; MVT::ValueType ValueType;
virtual void ANCHOR(); // Out-of-line virtual method to give class a home.
protected: protected:
friend class SelectionDAG; friend class SelectionDAG;
VTSDNode(MVT::ValueType VT) VTSDNode(MVT::ValueType VT)
@ -1396,6 +1410,8 @@ public:
/// LoadSDNode - This class is used to represent ISD::LOAD nodes. /// LoadSDNode - This class is used to represent ISD::LOAD nodes.
/// ///
class LoadSDNode : public SDNode { class LoadSDNode : public SDNode {
virtual void ANCHOR(); // Out-of-line virtual method to give class a home.
// AddrMode - unindexed, pre-indexed, post-indexed. // AddrMode - unindexed, pre-indexed, post-indexed.
ISD::MemIndexedMode AddrMode; ISD::MemIndexedMode AddrMode;
@ -1449,6 +1465,8 @@ public:
/// StoreSDNode - This class is used to represent ISD::STORE nodes. /// StoreSDNode - This class is used to represent ISD::STORE nodes.
/// ///
class StoreSDNode : public SDNode { class StoreSDNode : public SDNode {
virtual void ANCHOR(); // Out-of-line virtual method to give class a home.
// AddrMode - unindexed, pre-indexed, post-indexed. // AddrMode - unindexed, pre-indexed, post-indexed.
ISD::MemIndexedMode AddrMode; ISD::MemIndexedMode AddrMode;

View File

@ -2518,8 +2518,23 @@ unsigned SelectionDAG::AssignTopologicalOrder(std::vector<SDNode*> &TopOrder) {
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
// Out-of-line virtual method to give class a home. // Out-of-line virtual method to give class a home.
void SDNode::ANCHOR() { void SDNode::ANCHOR() {}
} void HandleSDNode::ANCHOR() {}
void StringSDNode::ANCHOR() {}
void ConstantSDNode::ANCHOR() {}
void ConstantFPSDNode::ANCHOR() {}
void GlobalAddressSDNode::ANCHOR() {}
void FrameIndexSDNode::ANCHOR() {}
void JumpTableSDNode::ANCHOR() {}
void ConstantPoolSDNode::ANCHOR() {}
void BasicBlockSDNode::ANCHOR() {}
void SrcValueSDNode::ANCHOR() {}
void RegisterSDNode::ANCHOR() {}
void ExternalSymbolSDNode::ANCHOR() {}
void CondCodeSDNode::ANCHOR() {}
void VTSDNode::ANCHOR() {}
void LoadSDNode::ANCHOR() {}
void StoreSDNode::ANCHOR() {}
/// Profile - Gather unique data for the node. /// Profile - Gather unique data for the node.
/// ///