mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-03 18:29:08 +00:00
[Target] Use hasOneUse() instead of getNumUses().
The latter does a liner scan over a linked list, therefore is much more expensive. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300518 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4df72d14c8
commit
540c0392b5
@ -7126,7 +7126,7 @@ bool AArch64TargetLowering::isProfitableToHoist(Instruction *I) const {
|
|||||||
if (I->getOpcode() != Instruction::FMul)
|
if (I->getOpcode() != Instruction::FMul)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (I->getNumUses() != 1)
|
if (!I->hasOneUse())
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
Instruction *User = I->user_back();
|
Instruction *User = I->user_back();
|
||||||
|
Loading…
Reference in New Issue
Block a user