Lines Matching refs:CS

277   CallSite CS;  member
287 Function *F = CS.getCaller(); in emitRemark()
288 DebugLoc DLoc = CS->getDebugLoc(); in emitRemark()
289 BasicBlock *Block = CS.getParent(); in emitRemark()
304 CS->replaceAllUsesWith(New); in replaceAndErase()
305 if (auto II = dyn_cast<InvokeInst>(CS.getInstruction())) { in replaceAndErase()
306 BranchInst::Create(II->getNormalDest(), CS.getInstruction()); in replaceAndErase()
309 CS->eraseFromParent(); in replaceAndErase()
380 void addCallSite(Value *VTable, CallSite CS, unsigned *NumUnsafeUses);
383 CallSiteInfo &findCallSiteInfo(CallSite CS);
386 CallSiteInfo &VTableSlotInfo::findCallSiteInfo(CallSite CS) { in findCallSiteInfo() argument
388 auto *CI = dyn_cast<IntegerType>(CS.getType()); in findCallSiteInfo()
389 if (!CI || CI->getBitWidth() > 64 || CS.arg_empty()) in findCallSiteInfo()
391 for (auto &&Arg : make_range(CS.arg_begin() + 1, CS.arg_end())) { in findCallSiteInfo()
400 void VTableSlotInfo::addCallSite(Value *VTable, CallSite CS, in addCallSite() argument
402 auto &CSI = findCallSiteInfo(CS); in addCallSite()
404 CSI.CallSites.push_back({VTable, CS, NumUnsafeUses}); in addCallSite()
777 VCallSite.CS.setCalledFunction(ConstantExpr::getBitCast( in applySingleImplDevirt()
778 TheFn, VCallSite.CS.getCalledValue()->getType())); in applySingleImplDevirt()
906 CallSite CS = VCallSite.CS; in applyICallBranchFunnel() local
909 Attribute FSAttr = CS.getCaller()->getFnAttribute("target-features"); in applyICallBranchFunnel()
922 for (Type *T : CS.getFunctionType()->params()) in applyICallBranchFunnel()
925 FunctionType::get(CS.getFunctionType()->getReturnType(), NewArgs, in applyICallBranchFunnel()
926 CS.getFunctionType()->isVarArg())); in applyICallBranchFunnel()
928 IRBuilder<> IRB(CS.getInstruction()); in applyICallBranchFunnel()
931 for (unsigned I = 0; I != CS.getNumArgOperands(); ++I) in applyICallBranchFunnel()
932 Args.push_back(CS.getArgOperand(I)); in applyICallBranchFunnel()
935 if (CS.isCall()) in applyICallBranchFunnel()
940 cast<InvokeInst>(CS.getInstruction())->getNormalDest(), in applyICallBranchFunnel()
941 cast<InvokeInst>(CS.getInstruction())->getUnwindDest(), Args); in applyICallBranchFunnel()
942 NewCS.setCallingConv(CS.getCallingConv()); in applyICallBranchFunnel()
944 AttributeList Attrs = CS.getAttributes(); in applyICallBranchFunnel()
955 CS->replaceAllUsesWith(NewCS.getInstruction()); in applyICallBranchFunnel()
956 CS->eraseFromParent(); in applyICallBranchFunnel()
1007 ConstantInt::get(cast<IntegerType>(Call.CS.getType()), TheRetVal)); in applyUniformRetValOpt()
1113 IRBuilder<> B(Call.CS.getInstruction()); in applyUniqueRetValOpt()
1117 Cmp = B.CreateZExt(Cmp, Call.CS->getType()); in applyUniqueRetValOpt()
1181 auto *RetType = cast<IntegerType>(Call.CS.getType()); in applyVirtualConstProp()
1182 IRBuilder<> B(Call.CS.getInstruction()); in applyVirtualConstProp()
1390 if (SeenCallSites.insert(Call.CS).second) in scanTypeTestUsers()
1391 CallSlots[{TypeId, Call.Offset}].addCallSite(Ptr, Call.CS, nullptr); in scanTypeTestUsers()
1477 CallSlots[{TypeId, Call.Offset}].addCallSite(Ptr, Call.CS, in scanTypeCheckedLoadUsers()