summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMISelLowering.cpp
diff options
context:
space:
mode:
authorLauro Ramos Venancio <lauro.venancio@gmail.com>2007-05-14 18:46:23 +0000
committerLauro Ramos Venancio <lauro.venancio@gmail.com>2007-05-14 18:46:23 +0000
commitd705f5d51df975434b2d11be79eccf40f0a97a8c (patch)
tree17279ad56f63233637ec093418d4e04d205e681a /llvm/lib/Target/ARM/ARMISelLowering.cpp
parent3551928a2bde9d3756d8dae2f93f93c1f5339611 (diff)
downloadbcm5719-llvm-d705f5d51df975434b2d11be79eccf40f0a97a8c.tar.gz
bcm5719-llvm-d705f5d51df975434b2d11be79eccf40f0a97a8c.zip
Optimize PIC implementation. GOTOFF can be used when the symbol is defined
and used in the same module. llvm-svn: 37044
Diffstat (limited to 'llvm/lib/Target/ARM/ARMISelLowering.cpp')
-rw-r--r--llvm/lib/Target/ARM/ARMISelLowering.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM/ARMISelLowering.cpp b/llvm/lib/Target/ARM/ARMISelLowering.cpp
index 34ea98c0b94..30b2a94bb0d 100644
--- a/llvm/lib/Target/ARM/ARMISelLowering.cpp
+++ b/llvm/lib/Target/ARM/ARMISelLowering.cpp
@@ -792,7 +792,7 @@ SDOperand ARMTargetLowering::LowerGlobalAddressELF(SDOperand Op,
GlobalValue *GV = cast<GlobalAddressSDNode>(Op)->getGlobal();
Reloc::Model RelocM = getTargetMachine().getRelocationModel();
if (RelocM == Reloc::PIC_) {
- bool UseGOTOFF = GV->hasInternalLinkage();
+ bool UseGOTOFF = !GV->isDeclaration();
ARMConstantPoolValue *CPV =
new ARMConstantPoolValue(GV, ARMCP::CPValue, UseGOTOFF ? "GOTOFF":"GOT");
SDOperand CPAddr = DAG.getTargetConstantPool(CPV, PtrVT, 2);
OpenPOWER on IntegriCloud