mirror of
https://github.com/RPCS3/llvm.git
synced 2025-03-04 16:47:41 +00:00
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
This commit is contained in:
parent
6210a9493a
commit
95c5d0fb0a
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user