[PATCH] D19995: Optimize access to global variable references in PIE mode when linker supports copy relocations for PIE
David Majnemer via llvm-commits
llvm-commits at lists.llvm.org
Fri May 6 10:41:48 PDT 2016
majnemer added a subscriber: majnemer.
================
Comment at: lib/Target/X86/X86Subtarget.cpp:94
@@ -92,1 +93,3 @@
+ !isGlobalDefinedInPIE(GV, TM) &&
+ (isa<Function>(GV) || !GV->getParent()->getPIECopyRelocs()))
return X86II::MO_GOTPCREL;
----------------
What if it is a global alias to a function?
================
Comment at: lib/Target/X86/X86Subtarget.cpp:110
@@ -104,1 +109,3 @@
+ isGlobalDefinedInPIE(GV, TM) ||
+ (!isa<Function>(GV) && GV->getParent()->getPIECopyRelocs()))
return X86II::MO_GOTOFF;
----------------
Ditto.
http://reviews.llvm.org/D19995
More information about the llvm-commits
mailing list