aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2009-02-18 17:55:38 +0000
committerDuncan Sands <baldrick@free.fr>2009-02-18 17:55:38 +0000
commit95c5d0fb0a4e1ec88edae43c2db464e0cc63c76e (patch)
treec27b26be293f71903f75b28b8db530a010c9ccd8 /lib/Transforms
parent6210a9493a25a9f97f4f0ec62a3ed8ca00f72423 (diff)
downloadexternal_llvm-95c5d0fb0a4e1ec88edae43c2db464e0cc63c76e.zip
external_llvm-95c5d0fb0a4e1ec88edae43c2db464e0cc63c76e.tar.gz
external_llvm-95c5d0fb0a4e1ec88edae43c2db464e0cc63c76e.tar.bz2
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64926 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/IPO/GlobalOpt.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Transforms/IPO/GlobalOpt.cpp b/lib/Transforms/IPO/GlobalOpt.cpp
index 0ac1e65..0a35fa9 100644
--- a/lib/Transforms/IPO/GlobalOpt.cpp
+++ b/lib/Transforms/IPO/GlobalOpt.cpp
@@ -2383,6 +2383,7 @@ bool GlobalOpt::ResolveAliases(Module &M) {
Constant *Aliasee = J->getAliasee();
GlobalValue *Target = cast<GlobalValue>(Aliasee->stripPointerCasts());
+ Target->removeDeadConstantUsers();
bool hasOneUse = Target->hasOneUse() && Aliasee->hasOneUse();
// Make all users of the alias use the aliasee instead.