Lines Matching refs:CB

211     CallBase &CB = cast<CallBase>(*F->user_back());  in doPromotion()  local
212 assert(CB.getCalledFunction() == F); in doPromotion()
213 const AttributeList &CallPAL = CB.getAttributes(); in doPromotion()
214 IRBuilder<NoFolder> IRB(&CB); in doPromotion()
218 auto *AI = CB.arg_begin(); in doPromotion()
259 for (; AI != CB.arg_end(); ++AI, ++ArgNo) { in doPromotion()
265 CB.getOperandBundlesAsDefs(OpBundles); in doPromotion()
268 if (InvokeInst *II = dyn_cast<InvokeInst>(&CB)) { in doPromotion()
270 Args, OpBundles, "", CB.getIterator()); in doPromotion()
273 CallInst::Create(NF, Args, OpBundles, "", CB.getIterator()); in doPromotion()
274 NewCall->setTailCallKind(cast<CallInst>(&CB)->getTailCallKind()); in doPromotion()
277 NewCS->setCallingConv(CB.getCallingConv()); in doPromotion()
281 NewCS->copyMetadata(CB, {LLVMContext::MD_prof, LLVMContext::MD_dbg}); in doPromotion()
285 AttributeFuncs::updateMinLegalVectorWidthAttr(*CB.getCaller(), in doPromotion()
288 if (!CB.use_empty()) { in doPromotion()
289 CB.replaceAllUsesWith(NewCS); in doPromotion()
290 NewCS->takeName(&CB); in doPromotion()
295 CB.eraseFromParent(); in doPromotion()
440 CallBase &CB = cast<CallBase>(*U); in allCallersPassValidPointerForArgument() local
465 if (RecursiveCalls.contains(&CB)) in allCallersPassValidPointerForArgument()
468 return isDereferenceableAndAlignedPointer(CB.getArgOperand(Arg->getArgNo()), in allCallersPassValidPointerForArgument()
642 auto *CB = dyn_cast<CallBase>(V); in findArgParts() local
644 if (CB && CB->getCalledFunction() == CB->getFunction()) { in findArgParts()
666 RecursiveCalls.insert(CB); in findArgParts()
742 CallBase *CB = dyn_cast<CallBase>(U.getUser()); in areTypesABICompatible() local
743 if (!CB) in areTypesABICompatible()
746 const Function *Caller = CB->getCaller(); in areTypesABICompatible()
747 const Function *Callee = CB->getCalledFunction(); in areTypesABICompatible()
793 CallBase *CB = dyn_cast<CallBase>(U.getUser()); in promoteArguments() local
795 if (CB == nullptr || !CB->isCallee(&U) || in promoteArguments()
796 CB->getFunctionType() != F->getFunctionType()) in promoteArguments()
800 if (CB->isMustTailCall()) in promoteArguments()
803 if (CB->getFunction() == F) in promoteArguments()
829 CallBase &CB = cast<CallBase>(*U.getUser()); in promoteArguments() local
830 CB.removeParamAttr(ArgNo, Attribute::StructRet); in promoteArguments()
831 CB.addParamAttr(ArgNo, Attribute::NoAlias); in promoteArguments()