[llvm] 467b669 - [TargetMachine] Delete asan workaround

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 6 00:34:16 PST 2020


Author: Fangrui Song
Date: 2020-12-06T00:33:11-08:00
New Revision: 467b6699155ed1d0385eb4e0b03b1715a6d5f0e5

URL: https://github.com/llvm/llvm-project/commit/467b6699155ed1d0385eb4e0b03b1715a6d5f0e5
DIFF: https://github.com/llvm/llvm-project/commit/467b6699155ed1d0385eb4e0b03b1715a6d5f0e5.diff

LOG: [TargetMachine] Delete asan workaround

687b83ceabafe81970cd4639e7f0c89036402081 has fixed the X86FastISel bug.
We can revert the workaround now. Actually, the commit introduced a
bug that ppc64 should be excluded.

Added: 
    

Modified: 
    llvm/lib/Target/TargetMachine.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/TargetMachine.cpp b/llvm/lib/Target/TargetMachine.cpp
index 07a6e53c8f0f..ad0e90125258 100644
--- a/llvm/lib/Target/TargetMachine.cpp
+++ b/llvm/lib/Target/TargetMachine.cpp
@@ -163,11 +163,6 @@ bool TargetMachine::shouldAssumeDSOLocal(const Module &M,
     // If the symbol is defined, it cannot be preempted.
     if (!GV->isDeclarationForLinker())
       return true;
-    // FIXME Sanitizers do not call setDSOLocal appropriately. Fix sanitizers
-    // and delete the hack.
-    if (RM == Reloc::Static && !GV->isThreadLocal() &&
-        M.getFunction("asan.module_ctor"))
-      return true;
   } else if (TT.isOSBinFormatELF()) {
     // If dso_local allows AsmPrinter::getSymbolPreferLocal to use a local
     // alias, set the flag. We cannot set dso_local for other global values,


        


More information about the llvm-commits mailing list