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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@327314
91177308-0d34-0410-b5e6-
96231b3b80d8
// `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");