[llvm] r342684 - [GlobalDCE] AvailableExternal linkage is checked in isDiscardableIfUnused [NFC].
Xin Tong via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 20 14:16:16 PDT 2018
Author: trentxintong
Date: Thu Sep 20 14:16:16 2018
New Revision: 342684
URL: http://llvm.org/viewvc/llvm-project?rev=342684&view=rev
Log:
[GlobalDCE] AvailableExternal linkage is checked in isDiscardableIfUnused [NFC].
Summary:
AvailableExternal was not handled in isDiscardableIfUnused when isDiscardableIfUnused
was added in r158476. Till it was handled in r247044. This is a NFC.
Reviewers: pcc, tejohnson
Reviewed By: tejohnson
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D52319
Modified:
llvm/trunk/lib/Transforms/IPO/GlobalDCE.cpp
Modified: llvm/trunk/lib/Transforms/IPO/GlobalDCE.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/GlobalDCE.cpp?rev=342684&r1=342683&r2=342684&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/GlobalDCE.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/GlobalDCE.cpp Thu Sep 20 14:16:16 2018
@@ -165,7 +165,7 @@ PreservedAnalyses GlobalDCEPass::run(Mod
// 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);
More information about the llvm-commits
mailing list