Home
last modified time | relevance | path

Searched refs:CB (Results 1 – 25 of 371) sorted by relevance

12345678910>>...15

/freebsd-14.2/contrib/llvm-project/llvm/lib/Transforms/Scalar/
H A DCallSiteSplitting.cpp88 for (auto &I : CB.args()) { in addNonNullAttribute()
98 for (auto &I : CB.args()) { in setConstantInArgument()
113 for (auto I = CB.arg_begin(), E = CB.arg_end(); I != E; ++I, ++ArgNo) { in isCondRelevantToAnyCallArgument()
173 addNonNullAttribute(CB, Arg); in addConditions()
185 if (CB.isConvergent() || CB.cannotDuplicate()) in canSplitCallSite()
190 if (!isa<CallInst>(CB)) in canSplitCallSite()
422 for (auto &Arg : CB.args()) { in isPredicatedOnPHI()
444 if (!isPredicatedOnPHI(CB)) in shouldSplitOnPHIPredicatedArgument()
472 recordCondition(CB, Pred, CB.getParent(), Conditions); in shouldSplitOnPredicatedArgument()
489 if (!CB.arg_size() || !canSplitCallSite(CB, TTI)) in tryToSplitCallSite()
[all …]
/freebsd-14.2/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/
H A DUnreachableCodeChecker.cpp79 reachable.insert(CB->getBlockID()); in checkEndAnalysis()
95 for (const CFGBlock *CB : *C) { in checkEndAnalysis()
101 if (isEmptyCFGBlock(CB)) in checkEndAnalysis()
113 if (isInvalidPath(CB, *PM)) in checkEndAnalysis()
127 if (!CB->empty()) { in checkEndAnalysis()
129 for (CFGBlock::const_iterator ci = CB->begin(), ce = CB->end(); in checkEndAnalysis()
180 visited.insert(CB->getBlockID()); in FindUnreachableEntryPoints()
199 for (const CFGElement &Elem : *CB) { in getUnreachableStmt()
205 return CB->getTerminatorStmt(); in getUnreachableStmt()
218 if (CB->pred_size() > 1) in isInvalidPath()
[all …]
/freebsd-14.2/contrib/llvm-project/llvm/lib/Transforms/CFGuard/
H A DCFGuard.cpp175 assert(CB->isIndirectCall() && in insertCFGuardCheck()
178 IRBuilder<> B(CB); in insertCFGuardCheck()
204 assert(CB->isIndirectCall() && in insertCFGuardDispatch()
207 IRBuilder<> B(CB); in insertCFGuardDispatch()
220 assert((isa<CallInst>(CB) || isa<InvokeInst>(CB)) && in insertCFGuardDispatch()
222 CallBase *NewCB = CallBase::Create(CB, Bundles, CB); in insertCFGuardDispatch()
228 CB->replaceAllUsesWith(NewCB); in insertCFGuardDispatch()
231 CB->eraseFromParent(); in insertCFGuardDispatch()
277 if (CB && CB->isIndirectCall() && !CB->hasFnAttr("guard_nocf")) { in runOnFunction()
292 insertCFGuardDispatch(CB); in runOnFunction()
[all …]
/freebsd-14.2/contrib/llvm-project/llvm/lib/Transforms/Utils/
H A DCallPromotionUtils.cpp185 U->replaceUsesOfWith(&CB, Cast); in createRetBitCast()
286 IRBuilder<> Builder(&CB); in versionCallSite()
287 CallBase *OrigInst = &CB; in versionCallSite()
391 Type *CallRetTy = CB.getType(); in isLegalToPromote()
404 unsigned NumArgs = CB.arg_size(); in isLegalToPromote()
446 if (CB.isMustTailCall()) { in isLegalToPromote()
475 CB.setCalledOperand(Callee); in promoteCall()
486 return CB; in promoteCall()
547 return CB; in promoteCall()
563 assert(!CB.getCalledFunction()); in tryPromoteCall()
[all …]
H A DInlineFunction.cpp2037 assert(CB.getParent() && CB.getFunction() && "Instruction not in function!"); in InlineFunction()
2040 if (isa<CallBrInst>(CB)) in InlineFunction()
2086 if (CB.isConvergent()) { in InlineFunction()
2726 bool NeedBitCast = !CB.use_empty() && CB.getType() != NewRetTy; in InlineFunction()
2792 if (!CB.use_empty()) { in InlineFunction()
2795 CB.replaceAllUsesWith(PoisonValue::get(CB.getType())); in InlineFunction()
2800 CB.eraseFromParent(); in InlineFunction()
2868 if (!CB.use_empty()) { in InlineFunction()
2907 CB.replaceAllUsesWith(PoisonValue::get(CB.getType())); in InlineFunction()
2929 CB.replaceAllUsesWith(PoisonValue::get(CB.getType())); in InlineFunction()
[all …]
/freebsd-14.2/contrib/llvm-project/llvm/lib/Target/X86/MCTargetDesc/
H A DX86MCCodeEmitter.cpp41 static void emitByte(uint8_t C, SmallVectorImpl<char> &CB) { CB.push_back(C); } in emitByte() argument
297 emitByte(0xD5, CB); in emit()
300 CB); in emit()
303 emitByte(0xC5, CB); in emit()
317 CB); in emit()
320 CB); in emit()
893 emitByte(0xF3, CB); in emitPrefixImpl()
895 emitByte(0xF2, CB); in emitPrefixImpl()
900 emitByte(0x67, CB); in emitPrefixImpl()
1286 Prefix.emit(CB); in emitVEXOpcodePrefix()
[all …]
/freebsd-14.2/contrib/llvm-project/llvm/lib/Analysis/
H A DInlineAdvisor.cpp163 CB, GetInlineCost, ORE, in getDefaultInlineAdvice()
171 this, CB, OIC, in getAdviceImpl()
178 : Advisor(Advisor), Caller(CB.getCaller()), Callee(CB.getCalledFunction()), in InlineAdvice()
179 DLoc(CB.getDebugLoc()), Block(CB.getParent()), ORE(ORE), in InlineAdvice()
368 CB.addFnAttr(Attr); in setInlineRemark()
376 llvm::shouldInline(CallBase &CB, in shouldInline() argument
382 Instruction *Call = &CB; in shouldInline()
545 return std::make_unique<MandatoryInlineAdvice>(this, CB, getCallerORE(CB), in getMandatoryAdvice()
617 return getAdviceImpl(CB); in getAdvice()
618 bool Advice = CB.getCaller() != CB.getCalledFunction() && in getAdvice()
[all …]
H A DInlineOrder.cpp48 Function &Caller = *CB.getCaller(); in getInlineCostWrapper()
65 Function &Callee = *CB.getCalledFunction(); in getInlineCostWrapper()
211 auto It = Priorities.find(CB); in updateAndCheckDecreased()
244 CallBase *CB = Elt.first; in push() local
247 Heap.push_back(CB); in push()
248 Priorities[CB] = PriorityT(CB, FAM, Params); in push()
250 InlineHistoryMap[CB] = InlineHistoryID; in push()
257 CallBase *CB = Heap.pop_back_val(); in pop() local
258 T Result = std::make_pair(CB, InlineHistoryMap[CB]); in pop()
259 InlineHistoryMap.erase(CB); in pop()
[all …]
H A DMLInlineAdvisor.cpp328 auto &Caller = *CB.getCaller(); in getAdviceImpl()
329 auto &Callee = *CB.getCalledFunction(); in getAdviceImpl()
344 return getMandatoryAdvice(CB, false); in getAdviceImpl()
379 return getMandatoryAdvice(CB, true); in getAdviceImpl()
382 for (auto I = CB.arg_begin(), E = CB.arg_end(); I != E; ++I) { in getAdviceImpl()
420 GetDefaultAdvice(CB); in getAdviceImpl()
421 return getAdviceFromModel(CB, ORE); in getAdviceImpl()
435 return std::make_unique<InlineAdvice>(this, CB, getCallerORE(CB), false); in getSkipAdviceIfUnreachableCallsite()
445 return getMandatoryAdviceImpl(CB); in getMandatoryAdvice()
451 return std::make_unique<InlineAdvice>(this, CB, getCallerORE(CB), Advice); in getMandatoryAdvice()
[all …]
H A DReplayInlineAdvisor.cpp93 std::unique_ptr<InlineAdvice> ReplayInlineAdvisor::getAdviceImpl(CallBase &CB) { in getAdviceImpl() argument
96 Function &Caller = *CB.getCaller(); in getAdviceImpl()
100 if (!hasInlineAdvice(*CB.getFunction())) { in getAdviceImpl()
103 return OriginalAdvisor->getAdvice(CB); in getAdviceImpl()
110 formatCallSiteLocation(CB.getDebugLoc(), ReplaySettings.ReplayFormat); in getAdviceImpl()
111 StringRef Callee = CB.getCalledFunction()->getName(); in getAdviceImpl()
121 this, CB, llvm::InlineCost::getAlways("previously inlined"), ORE, in getAdviceImpl()
127 return std::make_unique<DefaultInlineAdvice>(this, CB, std::nullopt, ORE, in getAdviceImpl()
136 this, CB, llvm::InlineCost::getAlways("AlwaysInline Fallback"), ORE, in getAdviceImpl()
141 return std::make_unique<DefaultInlineAdvice>(this, CB, std::nullopt, ORE, in getAdviceImpl()
[all …]
/freebsd-14.2/contrib/llvm-project/llvm/include/llvm/IR/
H A DAbstractCallSite.h76 CallBase *CB;
105 static void getCallbackUses(const CallBase &CB,
109 explicit operator bool() const { return CB != nullptr; }
112 CallBase *getInstruction() const { return CB; } in getInstruction()
116 return !isCallbackCall() && !CB->isIndirectCall(); in isDirectCall()
121 return !isCallbackCall() && CB->isIndirectCall(); in isIndirectCall()
139 return CB->isCallee(U); in isCallee()
156 return CB->arg_size(); in getNumArgOperands()
185 return CB->getArgOperand(ArgNo); in getCallArgOperand()
212 return CB->getCalledOperand(); in getCalledOperand()
[all …]
/freebsd-14.2/contrib/llvm-project/llvm/lib/Transforms/IPO/
H A DDeadArgumentElimination.cpp91 return CB.getCalledFunction() && !CB.getCalledFunction()->isDeclaration(); in isMustTailCalleeAnalyzable()
185 if (!CB) in deleteDeadVarargs()
189 Args.assign(CB->arg_begin(), CB->arg_begin() + NumArgs); in deleteDeadVarargs()
219 if (!CB->use_empty()) in deleteDeadVarargs()
222 NewCB->takeName(CB); in deleteDeadVarargs()
226 CB->eraseFromParent(); in deleteDeadVarargs()
317 if (!CB || !CB->isCallee(&U) || in removeDeadArgumentsFromCallers()
456 assert(CB->getArgOperand(ArgNo) == CB->getOperand(U->getOperandNo()) && in surveyUse()
566 if (!CB || !CB->isCallee(&U) || in surveyFunction()
959 if (!CB.use_empty() || CB.isUsedByMetadata()) { in removeDeadStuffFromFunction()
[all …]
H A DModuleInliner.cpp148 if (auto *CB = dyn_cast<CallBase>(&I)) in run() local
149 if (Function *Callee = CB->getCalledFunction()) { in run()
151 Calls->push({CB, -1}); in run()
154 setInlineRemark(*CB, "unavailable definition"); in run()
158 << NV("Caller", CB->getCaller()) in run()
181 CallBase *CB = P.first; in run() local
183 Function &F = *CB->getCaller(); in run()
184 Function &Callee = *CB->getCalledFunction(); in run()
197 setInlineRemark(*CB, "recursive"); in run()
201 auto Advice = Advisor.getAdvice(*CB, /*OnlyMandatory*/ false); in run()
[all …]
H A DArgumentPromotion.cpp213 IRBuilder<NoFolder> IRB(&CB); in doPromotion()
217 auto *AI = CB.arg_begin(); in doPromotion()
286 if (!CB.use_empty()) { in doPromotion()
287 CB.replaceAllUsesWith(NewCS); in doPromotion()
288 NewCS->takeName(&CB); in doPromotion()
293 CB.eraseFromParent(); in doPromotion()
438 CallBase &CB = cast<CallBase>(*U); in allCallersPassValidPointerForArgument() local
686 if (!CB) in areTypesABICompatible()
738 if (CB == nullptr || !CB->isCallee(&U) || in promoteArguments()
743 if (CB->isMustTailCall()) in promoteArguments()
[all …]
H A DAlwaysInliner.cpp53 if (auto *CB = dyn_cast<CallBase>(U)) in AlwaysInlineImpl() local
54 if (CB->getCalledFunction() == &F && in AlwaysInlineImpl()
55 CB->hasFnAttr(Attribute::AlwaysInline) && in AlwaysInlineImpl()
56 !CB->getAttributes().hasFnAttr(Attribute::NoInline)) in AlwaysInlineImpl()
57 Calls.insert(CB); in AlwaysInlineImpl()
59 for (CallBase *CB : Calls) { in AlwaysInlineImpl()
60 Function *Caller = CB->getCaller(); in AlwaysInlineImpl()
62 DebugLoc DLoc = CB->getDebugLoc(); in AlwaysInlineImpl()
63 BasicBlock *Block = CB->getParent(); in AlwaysInlineImpl()
69 InlineResult Res = InlineFunction(*CB, IFI, /*MergeAttributes=*/true, in AlwaysInlineImpl()
H A DFunctionAttrs.cpp539 if (!CB) { in captured()
552 if (UseIndex >= CB->arg_size()) { in captured()
651 if (CB.isCallee(U)) { in determinePointerAccessAttrs()
667 for (Use &UU : CB.uses()) in determinePointerAccessAttrs()
671 if (!CB.onlyReadsMemory()) in determinePointerAccessAttrs()
1103 if (CB.getCalledFunction() && SCCNodes.count(CB.getCalledFunction())) in isFunctionMallocLike()
1463 return CB && CB->isConvergent() && in InstrBreaksNonConvergent()
1486 if (!CB) in InstrBreaksNoFree()
1532 auto *CB = dyn_cast<CallBase>(&I); in InstrBreaksNoSync() local
1533 if (!CB) in InstrBreaksNoSync()
[all …]
/freebsd-14.2/contrib/llvm-project/llvm/lib/Target/SPIRV/MCTargetDesc/
H A DSPIRVMCCodeEmitter.cpp46 void encodeInstruction(const MCInst &MI, SmallVectorImpl<char> &CB,
83 support::endian::write(CB, static_cast<uint32_t>(Op.getImm()), in emitOperand()
93 SmallVectorImpl<char> &CB) { in emitTypedInstrOperands() argument
95 emitOperand(MI.getOperand(1), CB); in emitTypedInstrOperands()
96 emitOperand(MI.getOperand(0), CB); in emitTypedInstrOperands()
98 emitOperand(MI.getOperand(i), CB); in emitTypedInstrOperands()
103 SmallVectorImpl<char> &CB) { in emitUntypedInstrOperands() argument
105 emitOperand(Op, CB); in emitUntypedInstrOperands()
116 support::endian::write(CB, FirstWord, llvm::endianness::little); in encodeInstruction()
120 emitTypedInstrOperands(MI, CB); in encodeInstruction()
[all …]
/freebsd-14.2/contrib/llvm-project/llvm/lib/IR/
H A DAbstractCallSite.cpp49 if (CBCalleeIdx < CB.arg_size()) in getCallbackUses()
56 : CB(dyn_cast<CallBase>(U->getUser())) { in AbstractCallSite()
59 if (!CB) { in AbstractCallSite()
71 if (!CB) { in AbstractCallSite()
79 if (CB->isCallee(U)) { in AbstractCallSite()
86 Function *Callee = CB->getCalledFunction(); in AbstractCallSite()
89 CB = nullptr; in AbstractCallSite()
96 CB = nullptr; in AbstractCallSite()
100 unsigned UseIdx = CB->getArgOperandNo(U); in AbstractCallSite()
115 CB = nullptr; in AbstractCallSite()
[all …]
H A DConvergenceVerifier.cpp21 auto *CB = dyn_cast<CallBase>(&I); in findAndCheckConvergenceTokenUsed() local
22 if (!CB) in findAndCheckConvergenceTokenUsed()
26 CB->countOperandBundlesOfType(LLVMContext::OB_convergencectrl); in findAndCheckConvergenceTokenUsed()
29 {Context.print(CB)}); in findAndCheckConvergenceTokenUsed()
33 auto Bundle = CB->getOperandBundle(LLVMContext::OB_convergencectrl); in findAndCheckConvergenceTokenUsed()
37 {Context.print(CB)}); in findAndCheckConvergenceTokenUsed()
63 if (auto *CB = dyn_cast<CallBase>(&I)) { in isConvergent() local
64 return CB->isConvergent(); in isConvergent()
/freebsd-14.2/contrib/llvm-project/llvm/lib/Transforms/Instrumentation/
H A DIndirectCallPromotion.cpp141 uint32_t tryToPromote(CallBase &CB,
182 if (ICPInvokeOnly && isa<CallInst>(CB)) { in getPromotionCandidatesForCallSite()
190 if (ICPCallOnly && isa<InvokeInst>(CB)) { in getPromotionCandidatesForCallSite()
226 if (!isLegalToPromote(CB, TargetFunction, &Reason)) { in getPromotionCandidatesForCallSite()
252 MDBuilder MDB(CB.getContext()); in promoteIndirectCall()
257 promoteCallWithIfThenElse(CB, DirectCallee, BranchWeights); in promoteIndirectCall()
267 return OptimizationRemark(DEBUG_TYPE, "Promoted", &CB) in promoteIndirectCall()
298 for (auto *CB : findIndirectCalls(F)) { in processFunction() local
302 CB, NumVals, TotalCount, NumCandidates); in processFunction()
307 *CB, ICallProfDataRef, TotalCount, NumCandidates); in processFunction()
[all …]
/freebsd-14.2/contrib/llvm-project/llvm/lib/Target/AMDGPU/MCTargetDesc/
H A DR600MCCodeEmitter.cpp52 void emit(uint32_t value, SmallVectorImpl<char> &CB) const;
53 void emit(uint64_t value, SmallVectorImpl<char> &CB) const;
104 emit(InstWord01, CB); in encodeInstruction()
105 emit(InstWord2, CB); in encodeInstruction()
106 emit((uint32_t)0, CB); in encodeInstruction()
128 emit(Word01, CB); in encodeInstruction()
129 emit(Word2, CB); in encodeInstruction()
130 emit((uint32_t)0, CB); in encodeInstruction()
140 emit(Inst, CB); in encodeInstruction()
145 support::endian::write(CB, Value, llvm::endianness::little); in emit()
[all …]
/freebsd-14.2/contrib/llvm-project/llvm/include/llvm/Analysis/
H A DObjCARCUtil.h29 inline bool hasAttachedCallOpBundle(const CallBase *CB) { in hasAttachedCallOpBundle() argument
36 return !CB->getFunctionType()->getReturnType()->isVoidTy() && in hasAttachedCallOpBundle()
37 CB->getOperandBundle(LLVMContext::OB_clang_arc_attachedcall) in hasAttachedCallOpBundle()
43 inline std::optional<Function *> getAttachedARCFunction(const CallBase *CB) { in getAttachedARCFunction() argument
44 auto B = CB->getOperandBundle(LLVMContext::OB_clang_arc_attachedcall); in getAttachedARCFunction()
60 inline ARCInstKind getAttachedARCFunctionKind(const CallBase *CB) { in getAttachedARCFunctionKind() argument
61 std::optional<Function *> Fn = getAttachedARCFunction(CB); in getAttachedARCFunctionKind()
/freebsd-14.2/contrib/llvm-project/llvm/lib/Target/WebAssembly/
H A DWebAssemblyOptimizeReturned.cpp45 void visitCallBase(CallBase &CB);
58 void OptimizeReturned::visitCallBase(CallBase &CB) { in visitCallBase() argument
59 for (unsigned I = 0, E = CB.arg_size(); I < E; ++I) in visitCallBase()
60 if (CB.paramHasAttr(I, Attribute::Returned)) { in visitCallBase()
61 Value *Arg = CB.getArgOperand(I); in visitCallBase()
66 Arg->replaceUsesWithIf(&CB, in visitCallBase()
67 [&](Use &U) { return DT->dominates(&CB, U); }); in visitCallBase()
/freebsd-14.2/contrib/llvm-project/llvm/lib/Transforms/Coroutines/
H A DCoroEarly.cpp47 void Lowerer::lowerResumeOrDestroy(CallBase &CB, in lowerResumeOrDestroy() argument
49 Value *ResumeAddr = makeSubFnCall(CB.getArgOperand(0), Index, &CB); in lowerResumeOrDestroy()
50 CB.setCalledOperand(ResumeAddr); in lowerResumeOrDestroy()
51 CB.setCallingConv(CallingConv::Fast); in lowerResumeOrDestroy()
165 if (auto *CB = dyn_cast<CoroBeginInst>(U)) in setCannotDuplicate() local
166 CB->setCannotDuplicate(); in setCannotDuplicate()
174 auto *CB = dyn_cast<CallBase>(&I); in lowerEarlyIntrinsics() local
175 if (!CB) in lowerEarlyIntrinsics()
178 switch (CB->getIntrinsicID()) { in lowerEarlyIntrinsics()
188 CB->setCannotDuplicate(); in lowerEarlyIntrinsics()
[all …]
/freebsd-14.2/contrib/llvm-project/llvm/lib/Target/CSKY/MCTargetDesc/
H A DCSKYMCCodeEmitter.cpp62 support::endian::write(CB, static_cast<uint16_t>(Bin >> 16), in writeData()
64 support::endian::write(CB, static_cast<uint16_t>(Bin), in writeData()
81 writeData(Binary, 2, CB); in expandJBTF()
91 writeData(Binary, 4, CB); in expandJBTF()
106 writeData(Binary, Size, CB); in expandNEG()
113 writeData(Binary, Size, CB); in expandNEG()
128 writeData(Binary, Size, CB); in expandRSUBI()
135 writeData(Binary, Size, CB); in expandRSUBI()
153 expandJBTF(MI, CB, Fixups, STI); in encodeInstruction()
158 expandNEG(MI, CB, Fixups, STI); in encodeInstruction()
[all …]

12345678910>>...15