Lines Matching refs:CB

224     CallBase &CB = cast<CallBase>(*F->user_back());  in doPromotion()  local
225 assert(CB.getCalledFunction() == F); in doPromotion()
226 const AttributeList &CallPAL = CB.getAttributes(); in doPromotion()
227 IRBuilder<NoFolder> IRB(&CB); in doPromotion()
231 auto *AI = CB.arg_begin(); in doPromotion()
262 for (; AI != CB.arg_end(); ++AI, ++ArgNo) { in doPromotion()
268 CB.getOperandBundlesAsDefs(OpBundles); in doPromotion()
271 if (InvokeInst *II = dyn_cast<InvokeInst>(&CB)) { in doPromotion()
273 Args, OpBundles, "", &CB); in doPromotion()
275 auto *NewCall = CallInst::Create(NF, Args, OpBundles, "", &CB); in doPromotion()
276 NewCall->setTailCallKind(cast<CallInst>(&CB)->getTailCallKind()); in doPromotion()
279 NewCS->setCallingConv(CB.getCallingConv()); in doPromotion()
283 NewCS->copyMetadata(CB, {LLVMContext::MD_prof, LLVMContext::MD_dbg}); in doPromotion()
287 AttributeFuncs::updateMinLegalVectorWidthAttr(*CB.getCaller(), in doPromotion()
290 if (!CB.use_empty()) { in doPromotion()
291 CB.replaceAllUsesWith(NewCS); in doPromotion()
292 NewCS->takeName(&CB); in doPromotion()
297 CB.eraseFromParent(); in doPromotion()
440 CallBase &CB = cast<CallBase>(*U); in allCallersPassValidPointerForArgument() local
441 return isDereferenceableAndAlignedPointer(CB.getArgOperand(Arg->getArgNo()), in allCallersPassValidPointerForArgument()
691 CallBase *CB = dyn_cast<CallBase>(U.getUser()); in areTypesABICompatible() local
692 if (!CB) in areTypesABICompatible()
695 const Function *Caller = CB->getCaller(); in areTypesABICompatible()
696 const Function *Callee = CB->getCalledFunction(); in areTypesABICompatible()
742 CallBase *CB = dyn_cast<CallBase>(U.getUser()); in promoteArguments() local
744 if (CB == nullptr || !CB->isCallee(&U) || in promoteArguments()
745 CB->getFunctionType() != F->getFunctionType()) in promoteArguments()
749 if (CB->isMustTailCall()) in promoteArguments()
752 if (CB->getFunction() == F) in promoteArguments()
777 CallBase &CB = cast<CallBase>(*U.getUser()); in promoteArguments() local
778 CB.removeParamAttr(ArgNo, Attribute::StructRet); in promoteArguments()
779 CB.addParamAttr(ArgNo, Attribute::NoAlias); in promoteArguments()