diff options
author | Bill Wendling <isanbard@gmail.com> | 2008-09-16 21:12:30 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2008-09-16 21:12:30 +0000 |
commit | 8bc392fb1d67f29d594c1b03a58f21867b83d923 (patch) | |
tree | 68d7383ca48d3dffcda7754073419ae83de8734f /llvm/lib/Target/CellSPU/SPUISelLowering.cpp | |
parent | 5cf6120a7c7a92b4e47559157132070375891776 (diff) | |
download | bcm5719-llvm-8bc392fb1d67f29d594c1b03a58f21867b83d923.tar.gz bcm5719-llvm-8bc392fb1d67f29d594c1b03a58f21867b83d923.zip |
- Change "ExternalSymbolSDNode" to "SymbolSDNode".
- Add linkage to SymbolSDNode (default to external).
- Change ISD::ExternalSymbol to ISD::Symbol.
- Change ISD::TargetExternalSymbol to ISD::TargetSymbol
These changes pave the way to allowing SymbolSDNodes with non-external linkage.
llvm-svn: 56249
Diffstat (limited to 'llvm/lib/Target/CellSPU/SPUISelLowering.cpp')
-rw-r--r-- | llvm/lib/Target/CellSPU/SPUISelLowering.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/llvm/lib/Target/CellSPU/SPUISelLowering.cpp b/llvm/lib/Target/CellSPU/SPUISelLowering.cpp index 384755d6657..b97f4c4c2b9 100644 --- a/llvm/lib/Target/CellSPU/SPUISelLowering.cpp +++ b/llvm/lib/Target/CellSPU/SPUISelLowering.cpp @@ -92,12 +92,12 @@ namespace { || Opc == ISD::GlobalTLSAddress || Opc == ISD::JumpTable || Opc == ISD::ConstantPool - || Opc == ISD::ExternalSymbol + || Opc == ISD::Symbol || Opc == ISD::TargetGlobalAddress || Opc == ISD::TargetGlobalTLSAddress || Opc == ISD::TargetJumpTable || Opc == ISD::TargetConstantPool - || Opc == ISD::TargetExternalSymbol + || Opc == ISD::TargetSymbol || Opc == SPUISD::AFormAddr); } @@ -1201,9 +1201,9 @@ LowerCALL(SDValue Op, SelectionDAG &DAG, const SPUSubtarget *ST) { SmallVector<SDValue, 8> Ops; unsigned CallOpc = SPUISD::CALL; - // If the callee is a GlobalAddress/ExternalSymbol node (quite common, every - // direct call is) turn it into a TargetGlobalAddress/TargetExternalSymbol - // node so that legalize doesn't hack it. + // If the callee is a GlobalAddress/Symbol node (quite common, every direct + // call is) turn it into a TargetGlobalAddress/TargetSymbol node so that + // legalize doesn't hack it. if (GlobalAddressSDNode *G = dyn_cast<GlobalAddressSDNode>(Callee)) { GlobalValue *GV = G->getGlobal(); MVT CalleeVT = Callee.getValueType(); @@ -1229,8 +1229,9 @@ LowerCALL(SDValue Op, SelectionDAG &DAG, const SPUSubtarget *ST) { // address pairs: Callee = DAG.getNode(SPUISD::IndirectAddr, PtrVT, GA, Zero); } - } else if (ExternalSymbolSDNode *S = dyn_cast<ExternalSymbolSDNode>(Callee)) - Callee = DAG.getExternalSymbol(S->getSymbol(), Callee.getValueType()); + } else if (SymbolSDNode *S = dyn_cast<SymbolSDNode>(Callee)) + Callee = DAG.getSymbol(S->getSymbol(), Callee.getValueType(), + S->getLinkage()); else if (SDNode *Dest = isLSAAddress(Callee, DAG)) { // If this is an absolute destination address that appears to be a legal // local store address, use the munged value. |