[PATCH] D52319: [GlobalDCE] AvailableExternal linkage is checked in isDiscardableIfUnused [NFC].

Xin Tong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 20 14:19:46 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL342684: [GlobalDCE] AvailableExternal linkage is checked in isDiscardableIfUnused [NFC]. (authored by trentxintong, committed by ).

Repository:
  rL LLVM

https://reviews.llvm.org/D52319

Files:
  llvm/trunk/lib/Transforms/IPO/GlobalDCE.cpp


Index: llvm/trunk/lib/Transforms/IPO/GlobalDCE.cpp
===================================================================
--- llvm/trunk/lib/Transforms/IPO/GlobalDCE.cpp
+++ llvm/trunk/lib/Transforms/IPO/GlobalDCE.cpp
@@ -165,7 +165,7 @@
     // Functions with external linkage are needed if they have a body.
     // Externally visible & appending globals are needed, if they have an
     // initializer.
-    if (!GO.isDeclaration() && !GO.hasAvailableExternallyLinkage())
+    if (!GO.isDeclaration())
       if (!GO.isDiscardableIfUnused())
         MarkLive(GO);
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52319.166361.patch
Type: text/x-patch
Size: 567 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180920/3da47966/attachment.bin>


More information about the llvm-commits mailing list