Lines Matching defs:Callee
380 // Callee`. See the comment `versionCallSiteWithCond` for the transformation.
381 CallBase &llvm::versionCallSite(CallBase &CB, Value *Callee,
388 if (CB.getCalledOperand()->getType() != Callee->getType())
389 Callee = Builder.CreateBitCast(Callee, CB.getCalledOperand()->getType());
390 auto *Cond = Builder.CreateICmpEQ(CB.getCalledOperand(), Callee);
395 bool llvm::isLegalToPromote(const CallBase &CB, Function *Callee,
399 auto &DL = Callee->getDataLayout();
404 Type *FuncRetTy = Callee->getReturnType();
413 unsigned NumParams = Callee->getFunctionType()->getNumParams();
420 if (NumArgs != NumParams && !Callee->isVarArg()) {
433 if (Callee->hasParamAttribute(I, Attribute::ByVal) !=
439 if (Callee->hasParamAttribute(I, Attribute::InAlloca) !=
446 Type *FormalTy = Callee->getFunctionType()->getFunctionParamType(I);
470 assert(Callee->isVarArg());
481 CallBase &llvm::promoteCall(CallBase &CB, Function *Callee,
487 CB.setCalledOperand(Callee);
497 if (CB.getFunctionType() == Callee->getFunctionType())
502 Type *CalleeRetTy = Callee->getReturnType();
505 CB.mutateFunctionType(Callee->getFunctionType());
510 auto CalleeType = Callee->getFunctionType();
513 LLVMContext &Ctx = Callee->getContext();
534 ArgAttrs.addByValAttr(Callee->getParamByValType(ArgNo));
536 ArgAttrs.addInAllocaAttr(Callee->getParamInAllocaType(ArgNo));
563 CallBase &llvm::promoteCallWithIfThenElse(CallBase &CB, Function *Callee,
569 CallBase &NewInst = versionCallSite(CB, Callee, BranchWeights);
572 return promoteCall(NewInst, Callee);
576 Function *Callee,
593 return promoteCall(NewInst, Callee);
600 Value *Callee = CB.getCalledOperand();
602 LoadInst *VTableEntryLoad = dyn_cast<LoadInst>(Callee);