Reverting r56249. On further investigation, this functionality isn't needed.

Apologies for the thrashing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56251 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bill Wendling
2008-09-16 21:48:12 +00:00
parent aed48bfee8
commit 056292fd73
25 changed files with 151 additions and 169 deletions

View File

@@ -278,7 +278,7 @@ namespace llvm {
if (isa<FrameIndexSDNode>(Node)) return true;
if (isa<ConstantPoolSDNode>(Node)) return true;
if (isa<JumpTableSDNode>(Node)) return true;
if (isa<SymbolSDNode>(Node)) return true;
if (isa<ExternalSymbolSDNode>(Node)) return true;
if (isa<MemOperandSDNode>(Node)) return true;
if (Node->getOpcode() == ISD::EntryToken) return true;
return false;

View File

@@ -282,11 +282,8 @@ public:
return getConstantPool(C, VT, Align, Offset, true);
}
SDValue getBasicBlock(MachineBasicBlock *MBB);
SDValue getSymbol(const char *Sym, MVT VT,
GlobalValue::LinkageTypes LT = GlobalValue::ExternalLinkage);
SDValue getTargetSymbol(const char *Sym, MVT VT,
GlobalValue::LinkageTypes LT =
GlobalValue::ExternalLinkage);
SDValue getExternalSymbol(const char *Sym, MVT VT);
SDValue getTargetExternalSymbol(const char *Sym, MVT VT);
SDValue getArgFlags(ISD::ArgFlagsTy Flags);
SDValue getValueType(MVT);
SDValue getRegister(unsigned Reg, MVT VT);
@@ -761,8 +758,8 @@ private:
std::vector<SDNode*> ValueTypeNodes;
std::map<MVT, SDNode*, MVT::compareRawBits> ExtendedValueTypeNodes;
StringMap<SDNode*> Symbols;
StringMap<SDNode*> TargetSymbols;
StringMap<SDNode*> ExternalSymbols;
StringMap<SDNode*> TargetExternalSymbols;
};
template <> struct GraphTraits<SelectionDAG*> : public GraphTraits<SDNode*> {

View File

@@ -21,7 +21,6 @@
#include "llvm/Value.h"
#include "llvm/Constants.h"
#include "llvm/GlobalValue.h"
#include "llvm/ADT/FoldingSet.h"
#include "llvm/ADT/GraphTraits.h"
#include "llvm/ADT/iterator.h"
@@ -90,7 +89,7 @@ namespace ISD {
BasicBlock, VALUETYPE, ARG_FLAGS, CONDCODE, Register,
Constant, ConstantFP,
GlobalAddress, GlobalTLSAddress, FrameIndex,
JumpTable, ConstantPool, Symbol,
JumpTable, ConstantPool, ExternalSymbol,
// The address of the GOT
GLOBAL_OFFSET_TABLE,
@@ -134,7 +133,7 @@ namespace ISD {
TargetFrameIndex,
TargetJumpTable,
TargetConstantPool,
TargetSymbol,
TargetExternalSymbol,
/// RESULT = INTRINSIC_WO_CHAIN(INTRINSICID, arg1, arg2, ...)
/// This node represents a target intrinsic function with no side effects.
@@ -488,7 +487,7 @@ namespace ISD {
// INLINEASM - Represents an inline asm block. This node always has two
// return values: a chain and a flag result. The inputs are as follows:
// Operand #0 : Input chain.
// Operand #1 : A SymbolSDNode with a pointer to the asm string.
// Operand #1 : a ExternalSymbolSDNode with a pointer to the asm string.
// Operand #2n+2: A RegisterNode.
// Operand #2n+3: A TargetConstant, indicating if the reg is a use/def
// Operand #last: Optional, an incoming flag.
@@ -2046,24 +2045,23 @@ public:
}
};
class SymbolSDNode : public SDNode {
class ExternalSymbolSDNode : public SDNode {
const char *Symbol;
GlobalValue::LinkageTypes Linkage;
virtual void ANCHOR(); // Out-of-line virtual method to give class a home.
protected:
friend class SelectionDAG;
SymbolSDNode(bool isTarget, const char *Sym, MVT VT,
GlobalValue::LinkageTypes L)
: SDNode(isTarget ? ISD::TargetSymbol : ISD::Symbol,
getSDVTList(VT)), Symbol(Sym), Linkage(L) {}
ExternalSymbolSDNode(bool isTarget, const char *Sym, MVT VT)
: SDNode(isTarget ? ISD::TargetExternalSymbol : ISD::ExternalSymbol,
getSDVTList(VT)), Symbol(Sym) {
}
public:
const char *getSymbol() const { return Symbol; }
GlobalValue::LinkageTypes getLinkage() const { return Linkage; }
static bool classof(const SymbolSDNode *) { return true; }
const char *getSymbol() const { return Symbol; }
static bool classof(const ExternalSymbolSDNode *) { return true; }
static bool classof(const SDNode *N) {
return N->getOpcode() == ISD::Symbol ||
N->getOpcode() == ISD::TargetSymbol;
return N->getOpcode() == ISD::ExternalSymbol ||
N->getOpcode() == ISD::TargetExternalSymbol;
}
};