[llvm-commits] CVS: llvm/lib/Target/ARM/ARMISelLowering.cpp
Lauro Ramos Venancio
lauro.venancio at gmail.com
Mon May 14 11:46:41 PDT 2007
Changes in directory llvm/lib/Target/ARM:
ARMISelLowering.cpp updated: 1.50 -> 1.51
---
Log message:
Optimize PIC implementation. GOTOFF can be used when the symbol is defined
and used in the same module.
---
Diffs of the changes: (+1 -1)
ARMISelLowering.cpp | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
Index: llvm/lib/Target/ARM/ARMISelLowering.cpp
diff -u llvm/lib/Target/ARM/ARMISelLowering.cpp:1.50 llvm/lib/Target/ARM/ARMISelLowering.cpp:1.51
--- llvm/lib/Target/ARM/ARMISelLowering.cpp:1.50 Thu May 3 19:26:58 2007
+++ llvm/lib/Target/ARM/ARMISelLowering.cpp Mon May 14 13:46:23 2007
@@ -792,7 +792,7 @@
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);
More information about the llvm-commits
mailing list