diff options
author | Bill Wendling <isanbard@gmail.com> | 2008-09-16 21:48:12 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2008-09-16 21:48:12 +0000 |
commit | fef06056071dcd275f5ec539713a0dfcc33db436 (patch) | |
tree | f097aff34063d06c497f56489a186f411740cf34 /lib/Target/ARM | |
parent | 27d5317c5bf5a71f4cd720f84ae78c5b7b3f2cd1 (diff) | |
download | external_llvm-fef06056071dcd275f5ec539713a0dfcc33db436.zip external_llvm-fef06056071dcd275f5ec539713a0dfcc33db436.tar.gz external_llvm-fef06056071dcd275f5ec539713a0dfcc33db436.tar.bz2 |
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
Diffstat (limited to 'lib/Target/ARM')
-rw-r--r-- | lib/Target/ARM/ARMISelLowering.cpp | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/lib/Target/ARM/ARMISelLowering.cpp b/lib/Target/ARM/ARMISelLowering.cpp index 4131903..2202177 100644 --- a/lib/Target/ARM/ARMISelLowering.cpp +++ b/lib/Target/ARM/ARMISelLowering.cpp @@ -531,9 +531,9 @@ SDValue ARMTargetLowering::LowerCALL(SDValue Op, SelectionDAG &DAG) { InFlag = Chain.getValue(1); } - // 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 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. bool isDirect = false; bool isARMFunc = false; bool isLocalARMFunc = false; @@ -558,7 +558,7 @@ SDValue ARMTargetLowering::LowerCALL(SDValue Op, SelectionDAG &DAG) { Callee = DAG.getNode(ARMISD::PIC_ADD, getPointerTy(), Callee, PICLabel); } else Callee = DAG.getTargetGlobalAddress(GV, getPointerTy()); - } else if (SymbolSDNode *S = dyn_cast<SymbolSDNode>(Callee)) { + } else if (ExternalSymbolSDNode *S = dyn_cast<ExternalSymbolSDNode>(Callee)) { isDirect = true; bool isStub = Subtarget->isTargetDarwin() && getTargetMachine().getRelocationModel() != Reloc::Static; @@ -574,7 +574,7 @@ SDValue ARMTargetLowering::LowerCALL(SDValue Op, SelectionDAG &DAG) { SDValue PICLabel = DAG.getConstant(ARMPCLabelIndex++, MVT::i32); Callee = DAG.getNode(ARMISD::PIC_ADD, getPointerTy(), Callee, PICLabel); } else - Callee = DAG.getTargetSymbol(Sym, getPointerTy(), S->getLinkage()); + Callee = DAG.getTargetExternalSymbol(Sym, getPointerTy()); } // FIXME: handle tail calls differently. @@ -715,11 +715,12 @@ static SDValue LowerRET(SDValue Op, SelectionDAG &DAG) { return DAG.getNode(ARMISD::RET_FLAG, MVT::Other, Copy, Copy.getValue(1)); } -// ConstantPool, JumpTable, GlobalAddress, and Symbol are lowered as their -// target countpart wrapped in the ARMISD::Wrapper node. Suppose N is one of the -// above mentioned nodes. It has to be wrapped because otherwise Select(N) -// returns N. So the raw TargetGlobalAddress nodes, etc. can only be used to -// form addressing mode. These wrapped nodes will be selected into MOVi. +// ConstantPool, JumpTable, GlobalAddress, and ExternalSymbol are lowered as +// their target countpart wrapped in the ARMISD::Wrapper node. Suppose N is +// one of the above mentioned nodes. It has to be wrapped because otherwise +// Select(N) returns N. So the raw TargetGlobalAddress nodes, etc. can only +// be used to form addressing mode. These wrapped nodes will be selected +// into MOVi. static SDValue LowerConstantPool(SDValue Op, SelectionDAG &DAG) { MVT PtrVT = Op.getValueType(); ConstantPoolSDNode *CP = cast<ConstantPoolSDNode>(Op); @@ -759,7 +760,7 @@ ARMTargetLowering::LowerToTLSGeneralDynamicModel(GlobalAddressSDNode *GA, std::pair<SDValue, SDValue> CallResult = LowerCallTo(Chain, (const Type *) Type::Int32Ty, false, false, false, CallingConv::C, false, - DAG.getSymbol("__tls_get_addr", PtrVT), Args, DAG); + DAG.getExternalSymbol("__tls_get_addr", PtrVT), Args, DAG); return CallResult.first; } |