mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-09 11:25:55 +00:00
Mips: Don't create a dangling IR function just to get the address of a symbol.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146340 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1553,12 +1553,7 @@ LowerGlobalTLSAddress(SDValue Op, SelectionDAG &DAG) const
|
|||||||
unsigned PtrSize = PtrVT.getSizeInBits();
|
unsigned PtrSize = PtrVT.getSizeInBits();
|
||||||
IntegerType *PtrTy = Type::getIntNTy(*DAG.getContext(), PtrSize);
|
IntegerType *PtrTy = Type::getIntNTy(*DAG.getContext(), PtrSize);
|
||||||
|
|
||||||
SmallVector<Type*, 1> Params;
|
SDValue TlsGetAddr = DAG.getExternalSymbol("__tls_get_addr", PtrVT);
|
||||||
Params.push_back(PtrTy);
|
|
||||||
FunctionType *FuncTy = FunctionType::get(PtrTy, Params, false);
|
|
||||||
Function *Func = Function::Create(FuncTy, GlobalValue::ExternalLinkage,
|
|
||||||
"__tls_get_addr");
|
|
||||||
SDValue TlsGetAddr = DAG.getGlobalAddress(Func, dl, PtrVT);
|
|
||||||
|
|
||||||
ArgListTy Args;
|
ArgListTy Args;
|
||||||
ArgListEntry Entry;
|
ArgListEntry Entry;
|
||||||
|
Reference in New Issue
Block a user