Lines Matching refs:CB
210 CallBase &CB = cast<CallBase>(*F->user_back()); in doPromotion() local
211 assert(CB.getCalledFunction() == F); in doPromotion()
212 const AttributeList &CallPAL = CB.getAttributes(); in doPromotion()
213 IRBuilder<NoFolder> IRB(&CB); in doPromotion()
217 auto *AI = CB.arg_begin(); in doPromotion()
258 for (; AI != CB.arg_end(); ++AI, ++ArgNo) { in doPromotion()
264 CB.getOperandBundlesAsDefs(OpBundles); in doPromotion()
267 if (InvokeInst *II = dyn_cast<InvokeInst>(&CB)) { in doPromotion()
269 Args, OpBundles, "", &CB); in doPromotion()
271 auto *NewCall = CallInst::Create(NF, Args, OpBundles, "", &CB); in doPromotion()
272 NewCall->setTailCallKind(cast<CallInst>(&CB)->getTailCallKind()); in doPromotion()
275 NewCS->setCallingConv(CB.getCallingConv()); in doPromotion()
279 NewCS->copyMetadata(CB, {LLVMContext::MD_prof, LLVMContext::MD_dbg}); in doPromotion()
283 AttributeFuncs::updateMinLegalVectorWidthAttr(*CB.getCaller(), in doPromotion()
286 if (!CB.use_empty()) { in doPromotion()
287 CB.replaceAllUsesWith(NewCS); in doPromotion()
288 NewCS->takeName(&CB); in doPromotion()
293 CB.eraseFromParent(); in doPromotion()
438 CallBase &CB = cast<CallBase>(*U); in allCallersPassValidPointerForArgument() local
439 return isDereferenceableAndAlignedPointer(CB.getArgOperand(Arg->getArgNo()), in allCallersPassValidPointerForArgument()
685 CallBase *CB = dyn_cast<CallBase>(U.getUser()); in areTypesABICompatible() local
686 if (!CB) in areTypesABICompatible()
689 const Function *Caller = CB->getCaller(); in areTypesABICompatible()
690 const Function *Callee = CB->getCalledFunction(); in areTypesABICompatible()
736 CallBase *CB = dyn_cast<CallBase>(U.getUser()); in promoteArguments() local
738 if (CB == nullptr || !CB->isCallee(&U) || in promoteArguments()
739 CB->getFunctionType() != F->getFunctionType()) in promoteArguments()
743 if (CB->isMustTailCall()) in promoteArguments()
746 if (CB->getFunction() == F) in promoteArguments()
772 CallBase &CB = cast<CallBase>(*U.getUser()); in promoteArguments() local
773 CB.removeParamAttr(ArgNo, Attribute::StructRet); in promoteArguments()
774 CB.addParamAttr(ArgNo, Attribute::NoAlias); in promoteArguments()