diff options
author | Andrew Lenharth <andrewl@lenharth.org> | 2005-10-23 03:40:17 +0000 |
---|---|---|
committer | Andrew Lenharth <andrewl@lenharth.org> | 2005-10-23 03:40:17 +0000 |
commit | 2a2de66db2093a5bc1fd620d1b6ae7992a552b24 (patch) | |
tree | 0bb48a09b071a8fa7a5d1f8ff1b786810604b817 /lib/CodeGen/SelectionDAG/SelectionDAG.cpp | |
parent | 9cc5a0a1016c5d13ac0c74bce2fc6ef3c9089f3f (diff) |
add TargetExternalSymbol
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23886 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index a8489d2965..7d3cddb656 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -312,6 +312,9 @@ void SelectionDAG::RemoveNodeFromCSEMaps(SDNode *N) { case ISD::ExternalSymbol: Erased = ExternalSymbols.erase(cast<ExternalSymbolSDNode>(N)->getSymbol()); break; + case ISD::TargetExternalSymbol: + Erased = TargetExternalSymbols.erase(cast<ExternalSymbolSDNode>(N)->getSymbol()); + break; case ISD::VALUETYPE: Erased = ValueTypeNodes[cast<VTSDNode>(N)->getVT()] != 0; ValueTypeNodes[cast<VTSDNode>(N)->getVT()] = 0; @@ -551,7 +554,15 @@ SDOperand SelectionDAG::getValueType(MVT::ValueType VT) { SDOperand SelectionDAG::getExternalSymbol(const char *Sym, MVT::ValueType VT) { SDNode *&N = ExternalSymbols[Sym]; if (N) return SDOperand(N, 0); - N = new ExternalSymbolSDNode(Sym, VT); + N = new ExternalSymbolSDNode(false, Sym, VT); + AllNodes.push_back(N); + return SDOperand(N, 0); +} + +SDOperand SelectionDAG::getTargetExternalSymbol(const char *Sym, MVT::ValueType VT) { + SDNode *&N = TargetExternalSymbols[Sym]; + if (N) return SDOperand(N, 0); + N = new ExternalSymbolSDNode(true, Sym, VT); AllNodes.push_back(N); return SDOperand(N, 0); } @@ -1586,6 +1597,7 @@ const char *SDNode::getOperationName(const SelectionDAG *G) const { case ISD::BasicBlock: return "BasicBlock"; case ISD::Register: return "Register"; case ISD::ExternalSymbol: return "ExternalSymbol"; + case ISD::TargetExternalSymbol: return "TargetExternalSymbol"; case ISD::ConstantPool: return "ConstantPool"; case ISD::TargetConstantPool: return "TargetConstantPool"; case ISD::CopyToReg: return "CopyToReg"; |