Lines Matching refs:Call
181 Instruction *Call = CS.getInstruction(); in DeleteDeadVarargs() local
200 if (InvokeInst *II = dyn_cast<InvokeInst>(Call)) { in DeleteDeadVarargs()
202 Args, OpBundles, "", Call); in DeleteDeadVarargs()
204 NewCS = CallInst::Create(NF, Args, OpBundles, "", Call); in DeleteDeadVarargs()
206 ->setTailCallKind(cast<CallInst>(Call)->getTailCallKind()); in DeleteDeadVarargs()
210 NewCS->setDebugLoc(Call->getDebugLoc()); in DeleteDeadVarargs()
212 if (Call->extractProfTotalWeight(W)) in DeleteDeadVarargs()
217 if (!Call->use_empty()) in DeleteDeadVarargs()
218 Call->replaceAllUsesWith(NewCS.getInstruction()); in DeleteDeadVarargs()
220 NewCS->takeName(Call); in DeleteDeadVarargs()
224 Call->eraseFromParent(); in DeleteDeadVarargs()
880 Instruction *Call = CS.getInstruction(); in RemoveDeadStuffFromFunction() local
938 if (InvokeInst *II = dyn_cast<InvokeInst>(Call)) { in RemoveDeadStuffFromFunction()
940 Args, OpBundles, "", Call->getParent()); in RemoveDeadStuffFromFunction()
942 NewCS = CallInst::Create(NF, Args, OpBundles, "", Call); in RemoveDeadStuffFromFunction()
944 ->setTailCallKind(cast<CallInst>(Call)->getTailCallKind()); in RemoveDeadStuffFromFunction()
948 NewCS->setDebugLoc(Call->getDebugLoc()); in RemoveDeadStuffFromFunction()
950 if (Call->extractProfTotalWeight(W)) in RemoveDeadStuffFromFunction()
956 if (!Call->use_empty() || Call->isUsedByMetadata()) { in RemoveDeadStuffFromFunction()
957 if (New->getType() == Call->getType()) { in RemoveDeadStuffFromFunction()
959 Call->replaceAllUsesWith(New); in RemoveDeadStuffFromFunction()
960 New->takeName(Call); in RemoveDeadStuffFromFunction()
964 if (!Call->getType()->isX86_MMXTy()) in RemoveDeadStuffFromFunction()
965 Call->replaceAllUsesWith(UndefValue::get(Call->getType())); in RemoveDeadStuffFromFunction()
970 Instruction *InsertPt = Call; in RemoveDeadStuffFromFunction()
971 if (InvokeInst *II = dyn_cast<InvokeInst>(Call)) { in RemoveDeadStuffFromFunction()
998 Call->replaceAllUsesWith(RetVal); in RemoveDeadStuffFromFunction()
999 New->takeName(Call); in RemoveDeadStuffFromFunction()
1005 Call->eraseFromParent(); in RemoveDeadStuffFromFunction()