| /freebsd-12.1/contrib/llvm/lib/Transforms/Utils/ |
| H A D | CallPromotionUtils.cpp | 167 for (User *U : CS.getInstruction()->users()) in createRetBitCast() 187 U->replaceUsesOfWith(CS.getInstruction(), Cast); in createRetBitCast() 260 IRBuilder<> Builder(CS.getInstruction()); in versionCallSite() 261 Instruction *OrigInst = CS.getInstruction(); in versionCallSite() 328 Type *CallRetTy = CS.getInstruction()->getType(); in isLegalToPromote() 353 Type *ActualTy = CS.getArgument(I)->getType(); in isLegalToPromote() 371 CS.setCalledFunction(Callee); in promoteCall() 382 return CS.getInstruction(); in promoteCall() 404 auto *Arg = CS.getArgument(ArgNo); in promoteCall() 410 CS.setArgument(ArgNo, Cast); in promoteCall() [all …]
|
| H A D | InlineFunction.cpp | 1225 CallSite CS = CallSite(NewCall); in UpdateCallGraphAfterInlining() local 1226 if (CS && CS.getCalledFunction() && CS.getCalledFunction()->isIntrinsic()) in UpdateCallGraphAfterInlining() 1251 CallerNode->removeCallEdgeFor(CS); in UpdateCallGraphAfterInlining() 1520 if (CS.hasOperandBundles()) { in InlineFunction() 1616 if (CallSiteEHPad && CS.isCall()) { in InlineFunction() 1655 if (CS.isByValArgument(ArgNo)) { in InlineFunction() 1668 AddAlignmentAssumptions(CS, IFI); in InlineFunction() 2021 CallSite CS(I); in InlineFunction() local 2022 if (!CS) in InlineFunction() 2039 if (CS.isCall()) in InlineFunction() [all …]
|
| /freebsd-12.1/contrib/llvm/lib/IR/ |
| H A D | Statepoint.cpp | 22 if (!CS.getInstruction()) in getCalledFunction() 24 return CS.getCalledFunction(); in getCalledFunction() 28 if (auto *F = getCalledFunction(CS)) in isStatepoint() 34 if (auto CS = ImmutableCallSite(V)) in isStatepoint() local 35 return isStatepoint(CS); in isStatepoint() 44 return CS.getInstruction() && isa<GCRelocateInst>(CS.getInstruction()); in isGCRelocate() 48 if (auto CS = ImmutableCallSite(V)) in isGCRelocate() local 49 return isGCRelocate(CS); in isGCRelocate() 54 return CS.getInstruction() && isa<GCResultInst>(CS.getInstruction()); in isGCResult() 58 if (auto CS = ImmutableCallSite(V)) in isGCResult() local [all …]
|
| /freebsd-12.1/contrib/llvm/lib/Transforms/Scalar/ |
| H A D | CallSiteSplitting.cpp | 89 for (auto &I : CS.args()) { in addNonNullAttribute() 99 for (auto &I : CS.args()) { in setConstantInArgument() 114 for (CallSite::arg_iterator I = CS.arg_begin(), E = CS.arg_end(); I != E; in isCondRelevantToAnyCallArgument() 175 addNonNullAttribute(CS, Arg); in addConditions() 303 CallSite CS, in splitCallSite() argument 341 for (auto &CI : CS.args()) { in splitCallSite() 425 for (auto &I : CS.args()) in isPredicatedOnPHI() 448 if (!isPredicatedOnPHI(CS)) in shouldSplitOnPHIPredicatedArgument() 476 recordCondition(CS, Pred, CS.getInstruction()->getParent(), Conditions); in shouldSplitOnPredicatedArgument() 493 if (!CS.arg_size() || !canSplitCallSite(CS, TTI)) in tryToSplitCallSite() [all …]
|
| H A D | RewriteStatepointsForGC.cpp | 1438 ArrayRef<Use> CallArgs(CS.arg_begin(), CS.arg_end()); in makeStatepointExplicitImpl() 1493 if (CS.isCall()) { in makeStatepointExplicitImpl() 1574 if (!CS.getType()->isVoidTy() && !CS.getInstruction()->use_empty()) { in makeStatepointExplicitImpl() 1576 CS.getInstruction()->hasName() ? CS.getInstruction()->getName() : ""; in makeStatepointExplicitImpl() 1906 if (CS.isCall()) { in insertUseHolderAfter() 2079 if (CS.isInvoke()) { in rematerializeLiveValues() 2147 if (CS.isCall()) { in rematerializeLiveValues() 2186 for (CallSite CS : ToUpdate) in insertParsePoints() local 2194 for (CallSite CS : ToUpdate) { in insertParsePoints() local 2195 if (!CS.isInvoke()) in insertParsePoints() [all …]
|
| /freebsd-12.1/contrib/llvm/lib/Transforms/IPO/ |
| H A D | Inliner.cpp | 276 CallSite CS, InlineFunctionInfo &IFI, in InlineCallIfPossible() argument 281 Function *Caller = CS.getCaller(); in InlineCallIfPossible() 420 shouldInline(CallSite CS, function_ref<InlineCost(CallSite CS)> GetInlineCost, in shouldInline() argument 424 InlineCost IC = GetInlineCost(CS); in shouldInline() 427 Function *Caller = CS.getCaller(); in shouldInline() 564 CallSite CS(cast<Value>(&I)); in inlineCallsImpl() local 621 Function *Caller = CS.getCaller(); in inlineCallsImpl() 766 [this](CallSite CS) { return getInlineCost(CS); }, in inlineCalls() argument 927 if (auto CS = CallSite(&I)) in run() local 930 Calls.push_back({CS, -1}); in run() [all …]
|
| H A D | AlwaysInliner.cpp | 46 if (auto CS = CallSite(U)) in run() local 47 if (CS.getCalledFunction() == &F) in run() 48 Calls.insert(CS); in run() 50 for (CallSite CS : Calls) in run() local 54 InlineFunction(CS, IFI, /*CalleeAAR=*/nullptr, InsertLifetime); in run() 110 InlineCost getInlineCost(CallSite CS) override; 145 InlineCost AlwaysInlinerLegacyPass::getInlineCost(CallSite CS) { in getInlineCost() argument 146 Function *Callee = CS.getCalledFunction(); in getInlineCost() 152 CS.hasFnAttr(Attribute::AlwaysInline) && isInlineViable(*Callee)) in getInlineCost()
|
| H A D | FunctionAttrs.cpp | 359 CallSite CS(U->getUser()); in captured() local 360 if (!CS.getInstruction()) { in captured() 487 CallSite CS(I); in determinePointerReadAttrs() local 535 if (!CS.onlyReadsMemory() && !CS.onlyReadsMemory(UseIndex)) in determinePointerReadAttrs() 890 CallSite CS(RVI); in isFunctionMallocLike() local 893 if (CS.getCalledFunction() && SCCNodes.count(CS.getCalledFunction())) in isFunctionMallocLike() 999 CallSite CS(RVI); in isReturnNonNull() local 1209 const CallSite CS(&I); in InstrBreaksNonConvergent() local 1212 return CS && CS.isConvergent() && SCCNodes.count(CS.getCalledFunction()) == 0; in InstrBreaksNonConvergent() 1520 CallSite CS(I); in addNoRecurseAttrsTopDown() local [all …]
|
| H A D | DeadArgumentElimination.cpp | 178 CallSite CS(*I++); in DeleteDeadVarargs() local 179 if (!CS) in DeleteDeadVarargs() 184 Args.assign(CS.arg_begin(), CS.arg_begin() + NumArgs); in DeleteDeadVarargs() 307 CallSite CS(U.getUser()); in RemoveDeadArgumentsFromCallers() local 308 if (!CS || !CS.isCallee(&U)) in RemoveDeadArgumentsFromCallers() 433 if (CS.isBundleOperand(U)) in SurveyUse() 446 assert(CS.getArgument(ArgNo) in SurveyUse() 558 ImmutableCallSite CS(U.getUser()); in SurveyFunction() local 559 if (!CS || !CS.isCallee(&U)) { in SurveyFunction() 566 if (CS.isMustTailCall()) in SurveyFunction() [all …]
|
| H A D | WholeProgramDevirt.cpp | 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() 309 CS->eraseFromParent(); in replaceAndErase() 391 for (auto &&Arg : make_range(CS.arg_begin() + 1, CS.arg_end())) { in findCallSiteInfo() 402 auto &CSI = findCallSiteInfo(CS); in addCallSite() 906 CallSite CS = VCallSite.CS; in applyICallBranchFunnel() local 935 if (CS.isCall()) in applyICallBranchFunnel() [all …]
|
| /freebsd-12.1/contrib/llvm/lib/Target/AMDGPU/ |
| H A D | AMDGPUInline.cpp | 65 unsigned getInlineThreshold(CallSite CS) const; 107 Function *Caller = CS.getCaller(); in getInlineThreshold() 110 Function *Callee = CS.getCalledFunction(); in getInlineThreshold() 126 for (Value *PtrArg : CS.args()) { in getInlineThreshold() 152 static bool isWrapperOnlyCall(CallSite CS) { in isWrapperOnlyCall() argument 153 Function *Callee = CS.getCalledFunction(); in isWrapperOnlyCall() 171 Function *Callee = CS.getCalledFunction(); in getInlineCost() 172 Function *Caller = CS.getCaller(); in getInlineCost() 178 if (CS.isNoInline()) in getInlineCost() 184 if (CS.hasFnAttr(Attribute::AlwaysInline)) { in getInlineCost() [all …]
|
| H A D | AMDGPUFixFunctionBitcasts.cpp | 35 void visitCallSite(CallSite CS) { in visitCallSite() argument 36 if (CS.getCalledFunction()) in visitCallSite() 38 auto Callee = dyn_cast<Function>(CS.getCalledValue()->stripPointerCasts()); in visitCallSite() 39 if (Callee && isLegalToPromote(CS, Callee)) { in visitCallSite() 40 promoteCall(CS, Callee); in visitCallSite()
|
| /freebsd-12.1/contrib/llvm/lib/Analysis/ |
| H A D | InlineCost.cpp | 850 if (!allowSizeGrowth(CS)) { in updateThreshold() 1187 for (CallSite::arg_iterator I = CS.arg_begin(), E = CS.arg_end(); I != E; in simplifyCallSite() 1212 if (CS.isCall() && cast<CallInst>(CS.getInstruction())->cannotDuplicate()) in visitCallSite() 1268 if (!CS.onlyReadsMemory()) in visitCallSite() 1285 if (!CS.onlyReadsMemory()) in visitCallSite() 1299 if (CA.analyzeCall(CS)) { in visitCallSite() 1732 updateThreshold(CS, F); in analyzeCall() 1994 return getInlineCost(CS, CS.getCalledFunction(), Params, CalleeTTI, in getInlineCost() 2055 if (CS.isNoInline()) in getInlineCost() 2085 CallSite CS(&II); in isInlineViable() local [all …]
|
| H A D | AliasAnalysisSummary.cpp | 76 CallSite CS) { in instantiateInterfaceValue() argument 78 auto Value = (Index == 0) ? CS.getInstruction() : CS.getArgument(Index - 1); in instantiateInterfaceValue() 85 instantiateExternalRelation(ExternalRelation ERelation, CallSite CS) { in instantiateExternalRelation() argument 86 auto From = instantiateInterfaceValue(ERelation.From, CS); in instantiateExternalRelation() 89 auto To = instantiateInterfaceValue(ERelation.To, CS); in instantiateExternalRelation() 96 CallSite CS) { in instantiateExternalAttribute() argument 97 auto Value = instantiateInterfaceValue(EAttr.IValue, CS); in instantiateExternalAttribute()
|
| H A D | CallGraphSCCPass.cpp | 275 CallSite CS(I->first); in RefreshCallGraph() local 276 if (CS) { in RefreshCallGraph() 277 Function *Callee = CS.getCalledFunction(); in RefreshCallGraph() 291 CallSite CS(&I); in RefreshCallGraph() local 292 if (!CS) continue; in RefreshCallGraph() 293 Function *Callee = CS.getCalledFunction(); in RefreshCallGraph() 299 CallSites.find(CS.getInstruction()); in RefreshCallGraph() 315 if (CheckingMode && CS.getCalledFunction() && in RefreshCallGraph() 339 CGN->replaceCallEdge(CS, CS, CalleeNode); in RefreshCallGraph() 349 if (Function *Callee = CS.getCalledFunction()) { in RefreshCallGraph() [all …]
|
| /freebsd-12.1/contrib/llvm/lib/Target/X86/ |
| H A D | X86WinEHState.cpp | 465 if (CS.getNumArgOperands() != 2) in rewriteSetJmpCallSite() 494 if (CS.isCall()) { in rewriteSetJmpCallSite() 536 CallSite CS) { in getStateForCallSite() argument 626 if (!CS) in isStateStoreNeeded() 631 return !CS.doesNotAccessMemory(); in isStateStoreNeeded() 634 return !CS.doesNotThrow(); in isStateStoreNeeded() 679 CallSite CS(&I); in addStateStores() local 746 CallSite CS(&I); in addStateStores() local 766 CallSite CS(&I); in addStateStores() local 767 if (!CS) in addStateStores() [all …]
|
| /freebsd-12.1/contrib/llvm/lib/Transforms/Coroutines/ |
| H A D | CoroEarly.cpp | 32 void lowerResumeOrDestroy(CallSite CS, CoroSubFnInst::ResumeKind); 51 void Lowerer::lowerResumeOrDestroy(CallSite CS, in lowerResumeOrDestroy() argument 54 makeSubFnCall(CS.getArgOperand(0), Index, CS.getInstruction()); in lowerResumeOrDestroy() 55 CS.setCalledFunction(ResumeAddr); in lowerResumeOrDestroy() 56 CS.setCallingConv(CallingConv::Fast); in lowerResumeOrDestroy() 159 if (auto CS = CallSite(&I)) { in lowerEarlyIntrinsics() local 160 switch (CS.getIntrinsicID()) { in lowerEarlyIntrinsics() 170 CS.setCannotDuplicate(); in lowerEarlyIntrinsics() 176 CS.setCannotDuplicate(); in lowerEarlyIntrinsics() 194 lowerResumeOrDestroy(CS, CoroSubFnInst::ResumeIndex); in lowerEarlyIntrinsics() [all …]
|
| H A D | Coroutines.cpp | 180 if (CallSite CS = CallSite(cast<Value>(&I))) { in buildCGN() local 181 const Function *Callee = CS.getCalledFunction(); in buildCGN() 186 Node->addCalledFunction(CS, CG.getCallsExternalNode()); in buildCGN() 188 Node->addCalledFunction(CS, CG.getOrInsertFunction(Callee)); in buildCGN() 314 for (CoroSuspendInst *CS : CoroSuspends) { in buildFrom() 315 CS->replaceAllUsesWith(UndefValue::get(CS->getType())); in buildFrom() 316 CS->eraseFromParent(); in buildFrom() 317 if (auto *CoroSave = CS->getCoroSave()) in buildFrom() 335 for (CoroSuspendInst *CS : CoroSuspends) in buildFrom() 336 if (!CS->getCoroSave()) in buildFrom() [all …]
|
| /freebsd-12.1/contrib/llvm/tools/clang/lib/AST/ |
| H A D | PrintfFormatString.cpp | 484 if (CS.isIntArg()) in getScalarArgType() 518 if (CS.isUIntArg()) in getScalarArgType() 552 if (CS.isDoubleArg()) { in getScalarArgType() 589 switch (CS.getKind()) { in getScalarArgType() 882 os << CS.toString(); in toString() 890 switch (CS.getKind()) { in hasValidPlusPrefix() 916 switch (CS.getKind()) { in hasValidAlternativeForm() 943 switch (CS.getKind()) { in hasValidLeadingZeros() 975 switch (CS.getKind()) { in hasValidSpacePrefix() 1001 switch (CS.getKind()) { in hasValidLeftJustified() [all …]
|
| H A D | ScanfFormatString.cpp | 70 CS.setEndScanList(I); in ParseScanList() 203 if (ParseScanList(H, CS, I, E)) in ParseScanfSpecifier() 206 FS.setConversionSpecifier(CS); in ParseScanfSpecifier() 217 CS.setEndScanList(Beg + Len); in ParseScanfSpecifier() 218 FS.setConversionSpecifier(CS); in ParseScanfSpecifier() 229 if (!CS.consumesDataArgument()) in getArgType() 232 switch(CS.getKind()) { in getArgType() 437 CS.setKind(ConversionSpecifier::sArg); in fixType() 513 CS.setKind(ConversionSpecifier::fArg); in fixType() 515 CS.setKind(ConversionSpecifier::dArg); in fixType() [all …]
|
| /freebsd-12.1/contrib/llvm/include/llvm/IR/ |
| H A D | Statepoint.h | 60 bool isStatepoint(ImmutableCallSite CS); 64 bool isGCRelocate(ImmutableCallSite CS); 67 bool isGCResult(ImmutableCallSite CS); 89 explicit StatepointBase(CallSiteTy CS) { in StatepointBase() argument 90 if (isStatepoint(CS)) in StatepointBase() 91 StatepointCS = CS; in StatepointBase() 314 explicit ImmutableStatepoint(ImmutableCallSite CS) : Base(CS) {} in ImmutableStatepoint() argument 325 explicit Statepoint(CallSite CS) : Base(CS) {} in Statepoint() argument 398 ImmutableCallSite CS(getStatepoint()); in getBasePtr() 399 return *(CS.arg_begin() + getBasePtrIndex()); in getBasePtr() [all …]
|
| H A D | CallSite.h | 674 bool operator==(const CallSite &CS) const { return I == CS.I; } 675 bool operator!=(const CallSite &CS) const { return I != CS.I; } 676 bool operator<(const CallSite &CS) const { 690 CallSite CS; 691 CS.I = BaseInfo::getEmptyKey(); 692 return CS; 696 CallSite CS; 697 CS.I = BaseInfo::getTombstoneKey(); 698 return CS; 702 return BaseInfo::getHashValue(CS.I); [all …]
|
| /freebsd-12.1/contrib/llvm/lib/Target/WebAssembly/ |
| H A D | WebAssemblyOptimizeReturned.cpp | 46 void visitCallSite(CallSite CS); 59 void OptimizeReturned::visitCallSite(CallSite CS) { in visitCallSite() argument 60 for (unsigned i = 0, e = CS.getNumArgOperands(); i < e; ++i) in visitCallSite() 61 if (CS.paramHasAttr(i, Attribute::Returned)) { in visitCallSite() 62 Instruction *Inst = CS.getInstruction(); in visitCallSite() 63 Value *Arg = CS.getArgOperand(i); in visitCallSite()
|
| /freebsd-12.1/contrib/llvm/include/llvm/MCA/ |
| H A D | Instruction.h | 274 bool startsAfter(const CycleSegment &CS) const { return End <= CS.Begin; } in startsAfter() argument 275 bool endsBefore(const CycleSegment &CS) const { return Begin >= CS.End; } in endsBefore() argument 276 bool overlaps(const CycleSegment &CS) const { in overlaps() argument 277 return !startsAfter(CS) && !endsBefore(CS); in overlaps() 312 CycleSegment CS; member 315 : CS(Cycles), NumUnits(Units) {} in CS() function 316 unsigned size() const { return CS.size(); } in size() 317 bool isReserved() const { return CS.isReserved(); } in isReserved() 318 void setReserved() { CS.setReserved(); } in setReserved()
|
| /freebsd-12.1/contrib/llvm/lib/CodeGen/GlobalISel/ |
| H A D | CallLowering.cpp | 29 MachineIRBuilder &MIRBuilder, ImmutableCallSite CS, unsigned ResReg, in lowerCall() argument 31 auto &DL = CS.getParent()->getParent()->getParent()->getDataLayout(); in lowerCall() 38 unsigned NumFixedArgs = CS.getFunctionType()->getNumParams(); in lowerCall() 39 for (auto &Arg : CS.args()) { in lowerCall() 42 setArgFlags(OrigArg, i + AttributeList::FirstArgIndex, DL, CS); in lowerCall() 51 if (const Function *F = CS.getCalledFunction()) in lowerCall() 56 ArgInfo OrigRet{ResReg, CS.getType(), ISD::ArgFlagsTy{}}; in lowerCall() 58 setArgFlags(OrigRet, AttributeList::ReturnIndex, DL, CS); in lowerCall() 60 return lowerCall(MIRBuilder, CS.getCallingConv(), Callee, OrigRet, OrigArgs); in lowerCall()
|