diff options
| author | Duncan Sands <baldrick@free.fr> | 2009-02-18 17:55:38 +0000 |
|---|---|---|
| committer | Duncan Sands <baldrick@free.fr> | 2009-02-18 17:55:38 +0000 |
| commit | 7a1db33e7753b9facf0a5135d5315217c3349a65 (patch) | |
| tree | 6f4e1e907d0a4e74d70f8555ec77fdc3b0e1318f /llvm/lib | |
| parent | 257eac6d0c149c11e5c2ef086d16d3ddb86c1674 (diff) | |
| download | bcm5719-llvm-7a1db33e7753b9facf0a5135d5315217c3349a65.tar.gz bcm5719-llvm-7a1db33e7753b9facf0a5135d5315217c3349a65.zip | |
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
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Transforms/IPO/GlobalOpt.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
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<GlobalValue>(Aliasee->stripPointerCasts()); + Target->removeDeadConstantUsers(); bool hasOneUse = Target->hasOneUse() && Aliasee->hasOneUse(); // Make all users of the alias use the aliasee instead. |

