From 7a1db33e7753b9facf0a5135d5315217c3349a65 Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Wed, 18 Feb 2009 17:55:38 +0000 Subject: In theory the aliasee may have dead constant users here. Since we only do the transform if there is one use, strip off any such users in the hope of making the transform fire more often. llvm-svn: 64926 --- llvm/lib/Transforms/IPO/GlobalOpt.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'llvm/lib/Transforms') diff --git a/llvm/lib/Transforms/IPO/GlobalOpt.cpp b/llvm/lib/Transforms/IPO/GlobalOpt.cpp index 0ac1e65891b..0a35fa93e43 100644 --- a/llvm/lib/Transforms/IPO/GlobalOpt.cpp +++ b/llvm/lib/Transforms/IPO/GlobalOpt.cpp @@ -2383,6 +2383,7 @@ bool GlobalOpt::ResolveAliases(Module &M) { Constant *Aliasee = J->getAliasee(); GlobalValue *Target = cast(Aliasee->stripPointerCasts()); + Target->removeDeadConstantUsers(); bool hasOneUse = Target->hasOneUse() && Aliasee->hasOneUse(); // Make all users of the alias use the aliasee instead. -- cgit v1.2.3