From e0098928c9dfd8ae359efdb2de1fa5c658f7ad87 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Fri, 16 May 2014 22:37:03 +0000 Subject: Delete getAliasedGlobal. llvm-svn: 209040 --- llvm/lib/Target/ARM64/ARM64FastISel.cpp | 2 +- llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp | 9 +++------ llvm/lib/Target/PowerPC/PPCFastISel.cpp | 2 +- llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp | 3 +-- llvm/lib/Target/TargetMachine.cpp | 2 +- llvm/lib/Target/X86/X86AsmPrinter.cpp | 2 +- llvm/lib/Target/X86/X86FastISel.cpp | 2 +- llvm/lib/Target/X86/X86ISelLowering.cpp | 2 +- llvm/lib/Target/XCore/XCoreISelLowering.cpp | 2 +- 9 files changed, 11 insertions(+), 15 deletions(-) (limited to 'llvm/lib/Target') diff --git a/llvm/lib/Target/ARM64/ARM64FastISel.cpp b/llvm/lib/Target/ARM64/ARM64FastISel.cpp index f8b54d033f7..f4bf616559a 100644 --- a/llvm/lib/Target/ARM64/ARM64FastISel.cpp +++ b/llvm/lib/Target/ARM64/ARM64FastISel.cpp @@ -245,7 +245,7 @@ unsigned ARM64FastISel::ARM64MaterializeGV(const GlobalValue *GV) { // to peer through any aliases to find out if that rule applies. const GlobalValue *TLSGV = GV; if (const GlobalAlias *GA = dyn_cast(GV)) - TLSGV = GA->getAliasedGlobal(); + TLSGV = GA->getAliasee(); if (const GlobalVariable *GVar = dyn_cast(TLSGV)) if (GVar->isThreadLocal()) diff --git a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp index 688ca1c5eec..ac5c7f0c9bb 100644 --- a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp +++ b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp @@ -382,8 +382,7 @@ void PPCAsmPrinter::EmitInstruction(const MachineInstr *MI) { if (MO.isGlobal()) { const GlobalValue *GValue = MO.getGlobal(); const GlobalAlias *GAlias = dyn_cast(GValue); - const GlobalValue *RealGValue = - GAlias ? GAlias->getAliasedGlobal() : GValue; + const GlobalValue *RealGValue = GAlias ? GAlias->getAliasee() : GValue; MOSymbol = getSymbol(RealGValue); const GlobalVariable *GVar = dyn_cast(RealGValue); IsExternal = GVar && !GVar->hasInitializer(); @@ -429,8 +428,7 @@ void PPCAsmPrinter::EmitInstruction(const MachineInstr *MI) { else if (MO.isGlobal()) { const GlobalValue *GValue = MO.getGlobal(); const GlobalAlias *GAlias = dyn_cast(GValue); - const GlobalValue *RealGValue = - GAlias ? GAlias->getAliasedGlobal() : GValue; + const GlobalValue *RealGValue = GAlias ? GAlias->getAliasee() : GValue; MOSymbol = getSymbol(RealGValue); const GlobalVariable *GVar = dyn_cast(RealGValue); @@ -464,8 +462,7 @@ void PPCAsmPrinter::EmitInstruction(const MachineInstr *MI) { if (MO.isGlobal()) { const GlobalValue *GValue = MO.getGlobal(); const GlobalAlias *GAlias = dyn_cast(GValue); - const GlobalValue *RealGValue = - GAlias ? GAlias->getAliasedGlobal() : GValue; + const GlobalValue *RealGValue = GAlias ? GAlias->getAliasee() : GValue; MOSymbol = getSymbol(RealGValue); const GlobalVariable *GVar = dyn_cast(RealGValue); IsExternal = GVar && !GVar->hasInitializer(); diff --git a/llvm/lib/Target/PowerPC/PPCFastISel.cpp b/llvm/lib/Target/PowerPC/PPCFastISel.cpp index 266ca421362..c0c495fa9ae 100644 --- a/llvm/lib/Target/PowerPC/PPCFastISel.cpp +++ b/llvm/lib/Target/PowerPC/PPCFastISel.cpp @@ -1864,7 +1864,7 @@ unsigned PPCFastISel::PPCMaterializeGV(const GlobalValue *GV, MVT VT) { if (!GVar) { // If GV is an alias, use the aliasee for determining thread-locality. if (const GlobalAlias *GA = dyn_cast(GV)) - GVar = dyn_cast_or_null(GA->getAliasedGlobal()); + GVar = dyn_cast_or_null(GA->getAliasee()); } // FIXME: We don't yet handle the complexity of TLS. diff --git a/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp b/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp index 22c835f90b0..63dac61f4cd 100644 --- a/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp +++ b/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp @@ -1471,8 +1471,7 @@ SDNode *PPCDAGToDAGISel::Select(SDNode *N) { if (GlobalAddressSDNode *G = dyn_cast(GA)) { const GlobalValue *GValue = G->getGlobal(); const GlobalAlias *GAlias = dyn_cast(GValue); - const GlobalValue *RealGValue = - GAlias ? GAlias->getAliasedGlobal() : GValue; + const GlobalValue *RealGValue = GAlias ? GAlias->getAliasee() : GValue; const GlobalVariable *GVar = dyn_cast(RealGValue); assert((GVar || isa(RealGValue)) && "Unexpected global value subclass!"); diff --git a/llvm/lib/Target/TargetMachine.cpp b/llvm/lib/Target/TargetMachine.cpp index 14281ab3b24..f79cdfd0a79 100644 --- a/llvm/lib/Target/TargetMachine.cpp +++ b/llvm/lib/Target/TargetMachine.cpp @@ -126,7 +126,7 @@ TLSModel::Model TargetMachine::getTLSModel(const GlobalValue *GV) const { // If GV is an alias then use the aliasee for determining // thread-localness. if (const GlobalAlias *GA = dyn_cast(GV)) - GV = GA->getAliasedGlobal(); + GV = GA->getAliasee(); const GlobalVariable *Var = cast(GV); bool isLocal = Var->hasLocalLinkage(); diff --git a/llvm/lib/Target/X86/X86AsmPrinter.cpp b/llvm/lib/Target/X86/X86AsmPrinter.cpp index 6ed2c9cfac5..68e136bd776 100644 --- a/llvm/lib/Target/X86/X86AsmPrinter.cpp +++ b/llvm/lib/Target/X86/X86AsmPrinter.cpp @@ -675,7 +675,7 @@ void X86AsmPrinter::EmitEndOfAsmFile(Module &M) { continue; while (const GlobalAlias *A = dyn_cast(GV)) - GV = A->getAliasedGlobal(); + GV = A->getAliasee(); if (isa(GV)) DLLExportedFns.push_back(getSymbol(&Alias)); diff --git a/llvm/lib/Target/X86/X86FastISel.cpp b/llvm/lib/Target/X86/X86FastISel.cpp index 571ecc2b415..56bcfa30ff9 100644 --- a/llvm/lib/Target/X86/X86FastISel.cpp +++ b/llvm/lib/Target/X86/X86FastISel.cpp @@ -363,7 +363,7 @@ bool X86FastISel::handleConstantAddresses(const Value *V, X86AddressMode &AM) { // it works...). if (const GlobalAlias *GA = dyn_cast(GV)) if (const GlobalVariable *GVar = - dyn_cast_or_null(GA->getAliasedGlobal())) + dyn_cast_or_null(GA->getAliasee())) if (GVar->isThreadLocal()) return false; diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index 8c9cc60f0f0..df8413e9fe0 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -8824,7 +8824,7 @@ X86TargetLowering::LowerGlobalTLSAddress(SDValue Op, SelectionDAG &DAG) const { // If GV is an alias then use the aliasee for determining // thread-localness. if (const GlobalAlias *GA = dyn_cast(GV)) - GV = GA->getAliasedGlobal(); + GV = GA->getAliasee(); SDLoc dl(GA); SDValue Chain = DAG.getEntryNode(); diff --git a/llvm/lib/Target/XCore/XCoreISelLowering.cpp b/llvm/lib/Target/XCore/XCoreISelLowering.cpp index 3cd1b91ae4c..a3c786117b0 100644 --- a/llvm/lib/Target/XCore/XCoreISelLowering.cpp +++ b/llvm/lib/Target/XCore/XCoreISelLowering.cpp @@ -277,7 +277,7 @@ getGlobalAddressWrapper(SDValue GA, const GlobalValue *GV, const GlobalValue *UnderlyingGV = GV; // If GV is an alias then use the aliasee to determine the wrapper type if (const GlobalAlias *GA = dyn_cast(GV)) - UnderlyingGV = GA->getAliasedGlobal(); + UnderlyingGV = GA->getAliasee(); if (const GlobalVariable *GVar = dyn_cast(UnderlyingGV)) { if ( ( GVar->isConstant() && UnderlyingGV->isLocalLinkage(GV->getLinkage()) ) -- cgit v1.2.3