Home
last modified time | relevance | path

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

1234567891011

/llvm-project-15.0.7/clang-tools-extra/clangd/
H A DClangdServer.cpp486 CB = std::move(CB), this]() mutable { in formatFile()
514 CB = std::move(CB), this]() mutable { in formatOnType()
560 CB = std::move(CB), in rename()
657 CB = std::move(CB), in applyTweak()
696 auto Action = [Pos, CB = std::move(CB), in locateSymbolAt()
717 auto Action = [Path = Path.str(), CB = std::move(CB), in switchSourceHeader()
770 [=, CB = std::move(CB)]() mutable { in superTypes()
779 [=, CB = std::move(CB)]() mutable { CB(clangd::subTypes(Item, Index)); }); in subTypes()
876 auto Action = [Pos, CB = std::move(CB), in findImplementations()
888 auto Action = [Pos, Limit, CB = std::move(CB), in findReferences()
[all …]
H A DClangdServer.h229 Callback<CodeCompleteResult> CB);
234 Callback<SignatureHelp> CB);
251 Callback<llvm::Optional<HoverInfo>> CB);
298 Callback<std::vector<LocatedSymbol>> CB);
302 Callback<ReferencesResult> CB);
307 Callback<tooling::Replacements> CB);
312 Callback<std::vector<TextEdit>> CB);
320 Callback<RenameResult> CB);
339 Callback<std::vector<TweakRef>> CB);
343 Callback<Tweak::Effect> CB);
[all …]
/llvm-project-15.0.7/clang/lib/StaticAnalyzer/Checkers/
H A DUnreachableCodeChecker.cpp79 reachable.insert(CB->getBlockID()); in checkEndAnalysis()
96 const CFGBlock *CB = *I; in checkEndAnalysis() local
102 if (isEmptyCFGBlock(CB)) in checkEndAnalysis()
114 if (isInvalidPath(CB, *PM)) in checkEndAnalysis()
128 if (!CB->empty()) { in checkEndAnalysis()
130 for (CFGBlock::const_iterator ci = CB->begin(), ce = CB->end(); in checkEndAnalysis()
181 visited.insert(CB->getBlockID()); in FindUnreachableEntryPoints()
183 for (CFGBlock::const_pred_iterator I = CB->pred_begin(), E = CB->pred_end(); in FindUnreachableEntryPoints()
201 for (CFGBlock::const_iterator I = CB->begin(), E = CB->end(); I != E; ++I) { in getUnreachableStmt()
223 if (CB->pred_size() > 1) in isInvalidPath()
[all …]
/llvm-project-15.0.7/llvm/lib/Transforms/Scalar/
H A DCallSiteSplitting.cpp90 for (auto &I : CB.args()) { in addNonNullAttribute()
100 for (auto &I : CB.args()) { in setConstantInArgument()
115 for (auto I = CB.arg_begin(), E = CB.arg_end(); I != E; ++I, ++ArgNo) { in isCondRelevantToAnyCallArgument()
175 addNonNullAttribute(CB, Arg); in addConditions()
187 if (CB.isConvergent() || CB.cannotDuplicate()) in canSplitCallSite()
192 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 …]
/llvm-project-15.0.7/llvm/lib/Transforms/CFGuard/
H A DCFGuard.cpp162 assert(CB->isIndirectCall() && in insertCFGuardCheck()
165 IRBuilder<> B(CB); in insertCFGuardCheck()
192 assert(CB->isIndirectCall() && in insertCFGuardDispatch()
195 IRBuilder<> B(CB); in insertCFGuardDispatch()
213 assert((isa<CallInst>(CB) || isa<InvokeInst>(CB)) && in insertCFGuardDispatch()
215 CallBase *NewCB = CallBase::Create(CB, Bundles, CB); in insertCFGuardDispatch()
221 CB->replaceAllUsesWith(NewCB); in insertCFGuardDispatch()
224 CB->eraseFromParent(); in insertCFGuardDispatch()
271 if (CB && CB->isIndirectCall() && !CB->hasFnAttr("guard_nocf")) { in runOnFunction()
286 insertCFGuardDispatch(CB); in runOnFunction()
[all …]
/llvm-project-15.0.7/llvm/lib/Transforms/Utils/
H A DCallPromotionUtils.cpp184 U->replaceUsesOfWith(&CB, Cast); in createRetBitCast()
285 IRBuilder<> Builder(&CB); in versionCallSite()
286 CallBase *OrigInst = &CB; in versionCallSite()
390 Type *CallRetTy = CB.getType(); in isLegalToPromote()
403 unsigned NumArgs = CB.arg_size(); in isLegalToPromote()
462 CB.setCalledOperand(Callee); in promoteCall()
473 return CB; in promoteCall()
500 CB.setArgOperand(ArgNo, Cast); in promoteCall()
534 return CB; in promoteCall()
550 assert(!CB.getCalledFunction()); in tryPromoteCall()
[all …]
H A DInlineFunction.cpp1222 AttrBuilder AB(CB.getContext(), CB.getAttributes().getRetAttrs()); in IdentifyValidAttributes()
1790 assert(CB.getParent() && CB.getFunction() && "Instruction not in function!"); in InlineFunction()
1793 if (isa<CallBrInst>(CB)) in InlineFunction()
2431 bool NeedBitCast = !CB.use_empty() && CB.getType() != NewRetTy; in InlineFunction()
2497 if (!CB.use_empty()) { in InlineFunction()
2500 CB.replaceAllUsesWith(UndefValue::get(CB.getType())); in InlineFunction()
2505 CB.eraseFromParent(); in InlineFunction()
2571 if (!CB.use_empty()) { in InlineFunction()
2610 CB.replaceAllUsesWith(UndefValue::get(CB.getType())); in InlineFunction()
2633 CB.replaceAllUsesWith(PoisonValue::get(CB.getType())); in InlineFunction()
[all …]
/llvm-project-15.0.7/llvm/lib/Analysis/
H A DInlineAdvisor.cpp160 CB, GetInlineCost, ORE, in getDefaultInlineAdvice()
168 this, CB, OIC, in getAdviceImpl()
175 : Advisor(Advisor), Caller(CB.getCaller()), Callee(CB.getCalledFunction()), in InlineAdvice()
176 DLoc(CB.getDebugLoc()), Block(CB.getParent()), ORE(ORE), in InlineAdvice()
360 CB.addFnAttr(Attr); in setInlineRemark()
368 llvm::shouldInline(CallBase &CB, in shouldInline() argument
374 Instruction *Call = &CB; in shouldInline()
537 return std::make_unique<MandatoryInlineAdvice>(this, CB, getCallerORE(CB), in getMandatoryAdvice()
609 return getAdviceImpl(CB); in getAdvice()
610 bool Advice = CB.getCaller() != CB.getCalledFunction() && in getAdvice()
[all …]
H A DMLInlineAdvisor.cpp286 auto &Caller = *CB.getCaller(); in getAdviceImpl()
287 auto &Callee = *CB.getCalledFunction(); in getAdviceImpl()
302 return getMandatoryAdvice(CB, false); in getAdviceImpl()
337 return getMandatoryAdvice(CB, true); in getAdviceImpl()
340 for (auto I = CB.arg_begin(), E = CB.arg_end(); I != E; ++I) { in getAdviceImpl()
375 return getAdviceFromModel(CB, ORE); in getAdviceImpl()
379 MLInlineAdvisor::getAdviceFromModel(CallBase &CB, in getAdviceFromModel() argument
389 return std::make_unique<InlineAdvice>(this, CB, getCallerORE(CB), false); in getSkipAdviceIfUnreachableCallsite()
399 return getMandatoryAdviceImpl(CB); in getMandatoryAdvice()
405 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, None, ORE, in getAdviceImpl()
136 this, CB, llvm::InlineCost::getAlways("AlwaysInline Fallback"), ORE, in getAdviceImpl()
141 return std::make_unique<DefaultInlineAdvice>(this, CB, None, ORE, in getAdviceImpl()
[all …]
/llvm-project-15.0.7/llvm/unittests/Analysis/
H A DFunctionPropertiesAnalysisTest.cpp64 return CB; in findCall()
142 EXPECT_NE(CB, nullptr); in TEST_F()
195 EXPECT_NE(CB, nullptr); in TEST_F()
257 EXPECT_NE(CB, nullptr); in TEST_F()
319 EXPECT_NE(CB, nullptr); in TEST_F()
373 EXPECT_NE(CB, nullptr); in TEST_F()
428 EXPECT_NE(CB, nullptr); in TEST_F()
481 EXPECT_NE(CB, nullptr); in TEST_F()
538 EXPECT_NE(CB, nullptr); in TEST_F()
593 EXPECT_NE(CB, nullptr); in TEST_F()
[all …]
/llvm-project-15.0.7/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 …]
/llvm-project-15.0.7/llvm/include/llvm/Analysis/
H A DInlineOrder.h103 void update(const CallBase *CB) override { Priorities[CB] = evaluate(CB); }; in update() argument
106 auto It = Priorities.find(CB); in updateAndCheckDecreased()
108 It->second = evaluate(CB); in updateAndCheckDecreased()
144 CallBase *CB = Elt.first; in push() local
147 Heap.push_back(CB); in push()
148 PriorityPtr->update(CB); in push()
157 CallBase *CB = Heap.front(); in pop() local
158 T Result = std::make_pair(CB, InlineHistoryMap[CB]); in pop()
159 InlineHistoryMap.erase(CB); in pop()
169 CallBase *CB = Heap.front(); in front() local
[all …]
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 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 Optional<Function *> Fn = getAttachedARCFunction(CB); in getAttachedARCFunctionKind()
/llvm-project-15.0.7/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 …]
/llvm-project-15.0.7/llvm/lib/Transforms/IPO/
H A DDeadArgumentElimination.cpp178 if (!CB) in deleteDeadVarargs()
182 Args.assign(CB->arg_begin(), CB->arg_begin() + NumArgs); in deleteDeadVarargs()
212 if (!CB->use_empty()) in deleteDeadVarargs()
215 NewCB->takeName(CB); in deleteDeadVarargs()
219 CB->eraseFromParent(); in deleteDeadVarargs()
310 if (!CB || !CB->isCallee(&U) || in removeDeadArgumentsFromCallers()
449 assert(CB->getArgOperand(ArgNo) == CB->getOperand(U->getOperandNo()) && in surveyUse()
551 if (!CB || !CB->isCallee(&U) || in surveyFunction()
943 if (!CB.use_empty() || CB.isUsedByMetadata()) { in removeDeadStuffFromFunction()
952 CB.replaceAllUsesWith(PoisonValue::get(CB.getType())); in removeDeadStuffFromFunction()
[all …]
H A DAlwaysInliner.cpp56 if (auto *CB = dyn_cast<CallBase>(U)) in run() local
57 if (CB->getCalledFunction() == &F && in run()
58 CB->hasFnAttr(Attribute::AlwaysInline) && in run()
60 Calls.insert(CB); in run()
62 for (CallBase *CB : Calls) { in run()
63 Function *Caller = CB->getCaller(); in run()
65 DebugLoc DLoc = CB->getDebugLoc(); in run()
66 BasicBlock *Block = CB->getParent(); in run()
158 InlineCost getInlineCost(CallBase &CB) override;
194 Function *Callee = CB.getCalledFunction(); in getInlineCost()
[all …]
H A DInliner.cpp308 CallBase &CB, InlineFunctionInfo &IFI, in inlineCallIfPossible() argument
313 Function *Caller = CB.getCaller(); in inlineCallIfPossible()
401 if (!CB || isa<IntrinsicInst>(I)) in inlineCallsImpl()
454 CallBase &CB = *P.first; in inlineCallsImpl() local
457 Function *Caller = CB.getCaller(); in inlineCallsImpl()
499 CB.eraseFromParent(); in inlineCallsImpl()
503 DebugLoc DLoc = CB.getDebugLoc(); in inlineCallsImpl()
609 [&](CallBase &CB) { return getInlineCost(CB); }, LegacyAARGetter(*this), in inlineCalls() argument
803 Calls.push({CB, -1}); in run()
869 CallBase *CB = P.first; in run() local
[all …]
H A DArgumentPromotion.cpp227 IRBuilder<NoFolder> IRB(&CB); in doPromotion()
231 auto *AI = CB.arg_begin(); in doPromotion()
290 if (!CB.use_empty()) { in doPromotion()
291 CB.replaceAllUsesWith(NewCS); in doPromotion()
292 NewCS->takeName(&CB); in doPromotion()
297 CB.eraseFromParent(); in doPromotion()
440 CallBase &CB = cast<CallBase>(*U); in allCallersPassValidPointerForArgument() local
692 if (!CB) in areTypesABICompatible()
744 if (CB == nullptr || !CB->isCallee(&U) || in promoteArguments()
749 if (CB->isMustTailCall()) in promoteArguments()
[all …]
/llvm-project-15.0.7/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()
270 return OptimizationRemark(DEBUG_TYPE, "Promoted", &CB) in promoteIndirectCall()
301 for (auto *CB : findIndirectCalls(F)) { in processFunction() local
305 CB, NumVals, TotalCount, NumCandidates); in processFunction()
310 *CB, ICallProfDataRef, TotalCount, NumCandidates); in processFunction()
[all …]
/llvm-project-15.0.7/llvm/lib/Transforms/Coroutines/
H A DCoroEarly.cpp46 void Lowerer::lowerResumeOrDestroy(CallBase &CB, in lowerResumeOrDestroy() argument
48 Value *ResumeAddr = makeSubFnCall(CB.getArgOperand(0), Index, &CB); in lowerResumeOrDestroy()
49 CB.setCalledOperand(ResumeAddr); in lowerResumeOrDestroy()
50 CB.setCallingConv(CallingConv::Fast); in lowerResumeOrDestroy()
144 if (auto *CB = dyn_cast<CoroBeginInst>(U)) in setCannotDuplicate() local
145 CB->setCannotDuplicate(); in setCannotDuplicate()
153 auto *CB = dyn_cast<CallBase>(&I); in lowerEarlyIntrinsics() local
154 if (!CB) in lowerEarlyIntrinsics()
157 switch (CB->getIntrinsicID()) { in lowerEarlyIntrinsics()
167 CB->setCannotDuplicate(); in lowerEarlyIntrinsics()
[all …]
/llvm-project-15.0.7/clang-tools-extra/clangd/index/
H A DSymbol.h148 CB(S.Name); in visitStrings()
149 CB(S.Scope); in visitStrings()
150 CB(S.TemplateSpecializationArgs); in visitStrings()
151 CB(S.Signature); in visitStrings()
152 CB(S.CompletionSnippetSuffix); in visitStrings()
153 CB(S.Documentation); in visitStrings()
154 CB(S.ReturnType); in visitStrings()
155 CB(S.Type); in visitStrings()
156 auto RawCharPointerCB = [&CB](const char *&P) { in visitStrings()
158 CB(S); in visitStrings()
[all …]
/llvm-project-15.0.7/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()
/llvm-project-15.0.7/clang-tools-extra/test/clang-tidy/checkers/misc/
H A Ddefinitions-in-headers.hpp44 struct CB { struct
54 void CB<T>::f1() { // OK: Member function definition of a class template. in f1() argument
58 void CB<T>::CCA::f2(T a) { in f2()
63 struct CB<T>::CCB {
68 void CB<T>::CCB::f3() { in f3()
73 int CB<T>::a = 2; // OK: static data member definition of a class template.
75 template class CB<int>; // OK: explicitly instantiated static data member of a class template. variable
77 CB<double> cb; // OK: implicitly instantiated static data member of a class template. in callCB()
/llvm-project-15.0.7/llvm/test/LTO/X86/Inputs/
H A Dtype-mapping-bug4_1.ll9 %class.CB = type { %"class.std::unique_ptr_base.1" }
27 ; mapping `%class.CB* undef` creates the first instance of %class.CB (%class.CB).
29 ; mapping `!6` starts the stage2, during which second instance of %class.CB (%class.CB.1)
31 ; define void @d(%class.CB.1*)
32 ; After this, %class.CB (t2.o) (aka %class.CB.1) and
34 …call void @llvm.dbg.value(metadata %class.CB* undef, metadata !6, metadata !DIExpression()), !dbg …

1234567891011