mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 02:52:53 +02:00
[CallSiteSplitting] Use !Instruction::use_empty instead of checking for a non-zero return from getNumUses
getNumUses is a linear operation. It walks a linked list to get a count. So in this case its better to just ask if there are any users rather than how many. llvm-svn: 327314
This commit is contained in:
parent
c700daabdc
commit
f7376c55e0
@ -302,7 +302,7 @@ static void splitCallSite(
|
||||
// `musttail` calls must be followed by optional `bitcast`, and `ret`. The
|
||||
// split blocks will be terminated right after that so there're no users for
|
||||
// this phi in a `TailBB`.
|
||||
if (!IsMustTailCall && Instr->getNumUses())
|
||||
if (!IsMustTailCall && !Instr->use_empty())
|
||||
CallPN = PHINode::Create(Instr->getType(), Preds.size(), "phi.call");
|
||||
|
||||
DEBUG(dbgs() << "split call-site : " << *Instr << " into \n");
|
||||
|
Loading…
Reference in New Issue
Block a user