[PATCH] D52319: [GlobalDCE] AvailableExternal linkage is checked in isDiscardableIfUnused
Xin Tong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 20 12:45:38 PDT 2018
trentxintong created this revision.
trentxintong added reviewers: pcc, tejohnson.
AvailableExternal was not handled in isDiscardableIfUnused when isDiscardableIfUnused
was added in r158476. Till it was handled in r247044.
Repository:
rL LLVM
https://reviews.llvm.org/D52319
Files:
lib/Transforms/IPO/GlobalDCE.cpp
Index: lib/Transforms/IPO/GlobalDCE.cpp
===================================================================
--- lib/Transforms/IPO/GlobalDCE.cpp
+++ 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.166348.patch
Type: text/x-patch
Size: 534 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180920/26959f24/attachment.bin>
More information about the llvm-commits
mailing list