forked from OSchip/llvm-project
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
This commit is contained in:
parent
257eac6d0c
commit
7a1db33e77
|
@ -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…
Reference in New Issue