Lines Matching defs:Callee

382 // Callee`. See the comment `versionCallSiteWithCond` for the transformation.
383 CallBase &llvm::versionCallSite(CallBase &CB, Value *Callee,
390 if (CB.getCalledOperand()->getType() != Callee->getType())
391 Callee = Builder.CreateBitCast(Callee, CB.getCalledOperand()->getType());
392 auto *Cond = Builder.CreateICmpEQ(CB.getCalledOperand(), Callee);
397 bool llvm::isLegalToPromote(const CallBase &CB, Function *Callee,
401 auto &DL = Callee->getDataLayout();
406 Type *FuncRetTy = Callee->getReturnType();
415 unsigned NumParams = Callee->getFunctionType()->getNumParams();
422 if (NumArgs != NumParams && !Callee->isVarArg()) {
435 if (Callee->hasParamAttribute(I, Attribute::ByVal) !=
441 if (Callee->hasParamAttribute(I, Attribute::InAlloca) !=
448 Type *FormalTy = Callee->getFunctionType()->getFunctionParamType(I);
472 assert(Callee->isVarArg());
483 CallBase &llvm::promoteCall(CallBase &CB, Function *Callee,
489 CB.setCalledOperand(Callee);
499 if (CB.getFunctionType() == Callee->getFunctionType())
504 Type *CalleeRetTy = Callee->getReturnType();
507 CB.mutateFunctionType(Callee->getFunctionType());
512 auto CalleeType = Callee->getFunctionType();
515 LLVMContext &Ctx = Callee->getContext();
537 ArgAttrs.addByValAttr(Callee->getParamByValType(ArgNo));
539 ArgAttrs.addInAllocaAttr(Callee->getParamInAllocaType(ArgNo));
567 CallBase &llvm::promoteCallWithIfThenElse(CallBase &CB, Function *Callee,
573 CallBase &NewInst = versionCallSite(CB, Callee, BranchWeights);
576 return promoteCall(NewInst, Callee);
579 CallBase *llvm::promoteCallWithIfThenElse(CallBase &CB, Function &Callee,
582 if (!CtxProf.isFunctionKnown(Callee))
591 versionCallSite(CB, &Callee, /*BranchWeights=*/nullptr), &Callee);
596 NewCSInstr->setCallee(&Callee);
619 const GlobalValue::GUID CalleeGUID = AssignGUIDPass::getGUID(Callee);
665 Function *Callee,
682 return promoteCall(NewInst, Callee);
689 Value *Callee = CB.getCalledOperand();
691 LoadInst *VTableEntryLoad = dyn_cast<LoadInst>(Callee);