[Target] Use hasOneUse() instead of getNumUses().
The latter does a liner scan over a linked list, therefore is much more expensive. llvm-svn: 300518
This commit is contained in:
parent
7c0d74aa2b
commit
3e9986f368
|
@ -7126,7 +7126,7 @@ bool AArch64TargetLowering::isProfitableToHoist(Instruction *I) const {
|
|||
if (I->getOpcode() != Instruction::FMul)
|
||||
return true;
|
||||
|
||||
if (I->getNumUses() != 1)
|
||||
if (!I->hasOneUse())
|
||||
return true;
|
||||
|
||||
Instruction *User = I->user_back();
|
||||
|
|
Loading…
Reference in New Issue