[llvm-commits] [llvm] r75118 - /llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Chris Lattner
sabre at nondot.org
Thu Jul 9 00:02:30 PDT 2009
Author: lattner
Date: Thu Jul 9 02:02:30 2009
New Revision: 75118
URL: http://llvm.org/viewvc/llvm-project?rev=75118&view=rev
Log:
simplify this logic a bit more.
Modified:
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=75118&r1=75117&r2=75118&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Thu Jul 9 02:02:30 2009
@@ -4582,18 +4582,14 @@
// Link-once, declaration, or Weakly-linked global variables need
// non-lazily-resolved stubs.
- if (!GV->isDeclaration() && !GV->isWeakForLinker()) {
+ if (!ExtraLoadRequired) {
// Not a stub reference.
OpFlags = IsPIC ? X86II::MO_PIC_BASE_OFFSET : 0;
} else if (!GV->hasHiddenVisibility()) {
// Non-hidden $non_lazy_ptr reference.
OpFlags = IsPIC ? X86II::MO_DARWIN_NONLAZY_PIC_BASE :
X86II::MO_DARWIN_NONLAZY;
- } else if (!GV->isDeclaration() && !GV->hasCommonLinkage())
- // Definition is definitely in the current linkage unit.
- // Not a stub reference.
- OpFlags = IsPIC ? X86II::MO_PIC_BASE_OFFSET : 0;
- else {
+ } else {
// Hidden $non_lazy_ptr reference.
OpFlags = IsPIC ? X86II::MO_DARWIN_HIDDEN_NONLAZY_PIC_BASE :
X86II::MO_DARWIN_HIDDEN_NONLAZY;
More information about the llvm-commits
mailing list