Remove redundant calls to isMaterializable.
[oota-llvm.git] / lib / Target / X86 / X86Subtarget.cpp
index 82d62b4a365e5aeaf57093a49aa40f6ef435302f..6d55b84e738c3380974f7630ef9eddf756ceeab1 100644 (file)
@@ -68,12 +68,7 @@ ClassifyGlobalReference(const GlobalValue *GV, const TargetMachine &TM) const {
   if (GV->hasDLLImportStorageClass())
     return X86II::MO_DLLIMPORT;
 
-  // Determine whether this is a reference to a definition or a declaration.
-  // Materializable GVs (in JIT lazy compilation mode) do not require an extra
-  // load from stub.
-  bool isDecl = GV->hasAvailableExternallyLinkage();
-  if (GV->isDeclaration() && !GV->isMaterializable())
-    isDecl = true;
+  bool isDecl = GV->isDeclarationForLinker();
 
   // X86-64 in PIC mode.
   if (isPICStyleRIPRel()) {