We use dummy calls to adjust the liveness of values over statepoints in the midst of the insertion. If there are no values which need held live, there's no point in actually inserting the holder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234779
91177308-0d34-0410-b5e6-
96231b3b80d8
/// liftetime of the call.
static void insertUseHolderAfter(CallSite &CS, const ArrayRef<Value *> Values,
SmallVectorImpl<CallInst *> &holders) {
+ if (Values.empty())
+ // No values to hold live, might as well not insert the empty holder
+ return;
+
Module *M = CS.getInstruction()->getParent()->getParent()->getParent();
Function *Func = getUseHolder(*M);
if (CS.isCall()) {