| /freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/ |
| H A D | CallSiteSplitting.cpp | 86 static void addNonNullAttribute(CallBase &CB, Value *Op) { in addNonNullAttribute() argument 88 for (auto &I : CB.args()) { in addNonNullAttribute() 90 CB.addParamAttr(ArgNo, Attribute::NonNull); in addNonNullAttribute() 95 static void setConstantInArgument(CallBase &CB, Value *Op, in setConstantInArgument() argument 98 for (auto &I : CB.args()) { in setConstantInArgument() 102 CB.removeParamAttr(ArgNo, Attribute::NonNull); in setConstantInArgument() 103 CB.setArgOperand(ArgNo, ConstValue); in setConstantInArgument() 109 static bool isCondRelevantToAnyCallArgument(ICmpInst *Cmp, CallBase &CB) { in isCondRelevantToAnyCallArgument() argument 113 for (auto I = CB.arg_begin(), E = CB.arg_end(); I != E; ++I, ++ArgNo) { in isCondRelevantToAnyCallArgument() 115 if (isa<Constant>(*I) || CB.paramHasAttr(ArgNo, Attribute::NonNull)) in isCondRelevantToAnyCallArgument() [all …]
|
| /freebsd/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/ |
| H A D | UnreachableCodeChecker.cpp | 40 static inline const Stmt *getUnreachableStmt(const CFGBlock *CB); 41 static void FindUnreachableEntryPoints(const CFGBlock *CB, 44 static bool isInvalidPath(const CFGBlock *CB, const ParentMap &PM); 45 static inline bool isEmptyCFGBlock(const CFGBlock *CB); 78 const CFGBlock *CB = BE->getBlock(); in checkEndAnalysis() local 79 reachable.insert(CB->getBlockID()); in checkEndAnalysis() 95 for (const CFGBlock *CB : *C) { in checkEndAnalysis() 97 if (reachable.count(CB->getBlockID())) in checkEndAnalysis() 101 if (isEmptyCFGBlock(CB)) in checkEndAnalysis() 105 if (!visited.count(CB->getBlockID())) in checkEndAnalysis() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Transforms/CFGuard/ |
| H A D | CFGuard.cpp | 102 void insertCFGuardCheck(CallBase *CB); 143 void insertCFGuardDispatch(CallBase *CB); 175 void CFGuardImpl::insertCFGuardCheck(CallBase *CB) { in insertCFGuardCheck() argument 177 assert(CB->getModule()->getTargetTriple().isOSWindows() && in insertCFGuardCheck() 179 assert(CB->isIndirectCall() && in insertCFGuardCheck() 182 IRBuilder<> B(CB); in insertCFGuardCheck() 183 Value *CalledOperand = CB->getCalledOperand(); in insertCFGuardCheck() 188 if (auto Bundle = CB->getOperandBundle(LLVMContext::OB_funclet)) in insertCFGuardCheck() 204 void CFGuardImpl::insertCFGuardDispatch(CallBase *CB) { in insertCFGuardDispatch() argument 206 assert(CB->getModule()->getTargetTriple().isOSWindows() && in insertCFGuardDispatch() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Transforms/Utils/ |
| H A D | CallPromotionUtils.cpp | 168 static void createRetBitCast(CallBase &CB, Type *RetTy, CastInst **RetBitCast) { in createRetBitCast() argument 172 SmallVector<User *, 16> UsersToUpdate(CB.users()); in createRetBitCast() 177 if (auto *Invoke = dyn_cast<InvokeInst>(&CB)) in createRetBitCast() 181 InsertBefore = std::next(CB.getIterator()); in createRetBitCast() 184 auto *Cast = CastInst::CreateBitOrPointerCast(&CB, RetTy, "", InsertBefore); in createRetBitCast() 190 U->replaceUsesOfWith(&CB, Cast); in createRetBitCast() 287 static CallBase &versionCallSiteWithCond(CallBase &CB, Value *Cond, in versionCallSiteWithCond() argument 290 IRBuilder<> Builder(&CB); in versionCallSiteWithCond() 291 CallBase *OrigInst = &CB; in versionCallSiteWithCond() 298 SplitBlockAndInsertIfThen(Cond, &CB, false, BranchWeights); in versionCallSiteWithCond() [all …]
|
| H A D | InlineFunction.cpp | 905 propagateMemProfMetadata(Function *Callee, CallBase &CB, in propagateMemProfMetadata() argument 909 MDNode *CallsiteMD = CB.getMetadata(LLVMContext::MD_callsite); in propagateMemProfMetadata() 938 static void PropagateCallSiteMetadata(CallBase &CB, Function::iterator FStart, in PropagateCallSiteMetadata() argument 941 CB.getMetadata(LLVMContext::MD_mem_parallel_loop_access); in PropagateCallSiteMetadata() 942 MDNode *AccessGroup = CB.getMetadata(LLVMContext::MD_access_group); in PropagateCallSiteMetadata() 943 MDNode *AliasScope = CB.getMetadata(LLVMContext::MD_alias_scope); in PropagateCallSiteMetadata() 944 MDNode *NoAlias = CB.getMetadata(LLVMContext::MD_noalias); in PropagateCallSiteMetadata() 1117 static void AddAliasScopeMetadata(CallBase &CB, ValueToValueMapTy &VMap, in AddAliasScopeMetadata() argument 1123 const Function *CalledFunc = CB.getCalledFunction(); in AddAliasScopeMetadata() 1127 if (CB.paramHasAttr(Arg.getArgNo(), Attribute::NoAlias) && !Arg.use_empty()) in AddAliasScopeMetadata() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/SPIRV/MCTargetDesc/ |
| H A D | SPIRVMCCodeEmitter.cpp | 42 void encodeInstruction(const MCInst &MI, SmallVectorImpl<char> &CB, 45 void encodeUnknownType(const MCInst &MI, SmallVectorImpl<char> &CB, 75 static void emitOperand(const MCOperand &Op, SmallVectorImpl<char> &CB) { in emitOperand() argument 79 CB, SPIRV::getIDFromRegister(Op.getReg().id()) + 1, in emitOperand() 82 support::endian::write(CB, static_cast<uint32_t>(Op.getImm()), in emitOperand() 92 SmallVectorImpl<char> &CB) { in emitTypedInstrOperands() argument 94 emitOperand(MI.getOperand(1), CB); in emitTypedInstrOperands() 95 emitOperand(MI.getOperand(0), CB); in emitTypedInstrOperands() 97 emitOperand(MI.getOperand(i), CB); in emitTypedInstrOperands() 102 SmallVectorImpl<char> &CB) { in emitUntypedInstrOperands() argument [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/X86/MCTargetDesc/ |
| H A D | X86MCCodeEmitter.cpp | 43 static void emitByte(uint8_t C, SmallVectorImpl<char> &CB) { CB.push_back(C); } in emitByte() argument 298 void emit(SmallVectorImpl<char> &CB) const { in emit() 306 emitByte(0x40 | W << 3 | R << 2 | X << 1 | B, CB); in emit() 309 emitByte(0xD5, CB); in emit() 312 CB); in emit() 315 emitByte(0xC5, CB); in emit() 316 emitByte(((~R) & 1) << 7 | LastPayload, CB); in emit() 320 emitByte(Kind == VEX3 ? 0xC4 : 0x8F, CB); in emit() 321 emitByte(FirstPayload | VEX_5M, CB); in emit() 322 emitByte(W << 7 | LastPayload, CB); in emit() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Transforms/Coroutines/ |
| H A D | CoroAnnotationElide.cpp | 62 static void processCall(CallBase *CB, Function *Caller, Function *NewCallee, in processCall() argument 68 auto NewCBInsertPt = CB->getIterator(); in processCall() 71 NewArgs.append(CB->arg_begin(), CB->arg_end()); in processCall() 74 if (auto *CI = dyn_cast<CallInst>(CB)) { in processCall() 79 } else if (auto *II = dyn_cast<InvokeInst>(CB)) { in processCall() 88 NewCB->setCallingConv(CB->getCallingConv()); in processCall() 89 NewCB->setAttributes(CB->getAttributes()); in processCall() 90 NewCB->setDebugLoc(CB->getDebugLoc()); in processCall() 91 std::copy(CB->bundle_op_info_begin(), CB->bundle_op_info_end(), in processCall() 95 CB->replaceAllUsesWith(NewCB); in processCall() [all …]
|
| H A D | CoroEarly.cpp | 29 void lowerResumeOrDestroy(CallBase &CB, CoroSubFnInst::ResumeKind); 47 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() 186 if (auto *CB = dyn_cast<CoroBeginInst>(U)) in setCannotDuplicate() local 187 CB->setCannotDuplicate(); in setCannotDuplicate() 196 auto *CB = dyn_cast<CallBase>(&I); in lowerEarlyIntrinsics() local 197 if (!CB) in lowerEarlyIntrinsics() 200 switch (CB->getIntrinsicID()) { in lowerEarlyIntrinsics() [all …]
|
| /freebsd/contrib/llvm-project/llvm/include/llvm/IR/ |
| H A D | AbstractCallSite.h | 77 CallBase *CB; 107 getCallbackUses(const CallBase &CB, 111 explicit operator bool() const { return CB != nullptr; } 114 CallBase *getInstruction() const { return CB; } in getInstruction() 118 return !isCallbackCall() && !CB->isIndirectCall(); in isDirectCall() 123 return !isCallbackCall() && CB->isIndirectCall(); in isIndirectCall() 141 return CB->isCallee(U); in isCallee() 152 return (int)CB->getArgOperandNo(U) == CI.ParameterEncoding[0]; in isCallee() 158 return CB->arg_size(); in getNumArgOperands() 187 return CB->getArgOperand(ArgNo); in getCallArgOperand() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Analysis/ |
| H A D | InlineAdvisor.cpp | 83 MandatoryInlineAdvice(InlineAdvisor *Advisor, CallBase &CB, in MandatoryInlineAdvice() argument 86 : InlineAdvice(Advisor, CB, ORE, IsInliningMandatory) {} in MandatoryInlineAdvice() 145 CallBase &CB, FunctionAnalysisManager &FAM, const InlineParams &Params) { in getDefaultInlineAdvice() argument 146 Function &Caller = *CB.getCaller(); in getDefaultInlineAdvice() 150 *CB.getParent()->getParent()->getParent()); in getDefaultInlineAdvice() 167 Function &Callee = *CB.getCalledFunction(); in getDefaultInlineAdvice() 169 auto GetInlineCost = [&](CallBase &CB) { in getDefaultInlineAdvice() argument 173 return getInlineCost(CB, Params, CalleeTTI, GetAssumptionCache, GetTLI, in getDefaultInlineAdvice() 178 CB, CalleeTTI, GetInlineCost, ORE, in getDefaultInlineAdvice() 183 DefaultInlineAdvisor::getAdviceImpl(CallBase &CB) { in getAdviceImpl() argument [all …]
|
| H A D | InlineOrder.cpp | 45 llvm::InlineCost getInlineCostWrapper(CallBase &CB, in getInlineCostWrapper() argument 48 Function &Caller = *CB.getCaller(); in getInlineCostWrapper() 52 *CB.getParent()->getParent()->getParent()); in getInlineCostWrapper() 65 Function &Callee = *CB.getCalledFunction(); in getInlineCostWrapper() 70 return getInlineCost(CB, Params, CalleeTTI, GetAssumptionCache, GetTLI, in getInlineCostWrapper() 77 SizePriority(const CallBase *CB, FunctionAnalysisManager &, in SizePriority() argument 79 Function *Callee = CB->getCalledFunction(); in SizePriority() 94 CostPriority(const CallBase *CB, FunctionAnalysisManager &FAM, in CostPriority() argument 96 auto IC = getInlineCostWrapper(const_cast<CallBase &>(*CB), FAM, Params); in CostPriority() 114 CostBenefitPriority(const CallBase *CB, FunctionAnalysisManager &FAM, in CostBenefitPriority() argument [all …]
|
| H A D | MLInlineAdvisor.cpp | 354 std::unique_ptr<InlineAdvice> MLInlineAdvisor::getAdviceImpl(CallBase &CB) { in getAdviceImpl() argument 355 if (auto Skip = getSkipAdviceIfUnreachableCallsite(CB)) in getAdviceImpl() 358 auto &Caller = *CB.getCaller(); in getAdviceImpl() 359 auto &Callee = *CB.getCalledFunction(); in getAdviceImpl() 369 return std::make_unique<InlineAdvice>(this, CB, ORE, in getAdviceImpl() 370 GetDefaultAdvice(CB)); in getAdviceImpl() 372 auto MandatoryKind = InlineAdvisor::getMandatoryKind(CB, FAM, ORE); in getAdviceImpl() 379 return getMandatoryAdvice(CB, false); in getAdviceImpl() 388 return OptimizationRemarkMissed(DEBUG_TYPE, "ForceStop", &CB) in getAdviceImpl() 391 return std::make_unique<InlineAdvice>(this, CB, ORE, Mandatory); in getAdviceImpl() [all …]
|
| H A D | ReplayInlineAdvisor.cpp | 93 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/contrib/llvm-project/llvm/lib/IR/ |
| H A D | AbstractCallSite.cpp | 35 const CallBase &CB, SmallVectorImpl<const Use *> &CallbackUses) { in getCallbackUses() argument 36 const Function *Callee = CB.getCalledFunction(); in getCallbackUses() 49 if (CBCalleeIdx < CB.arg_size()) in getCallbackUses() 50 CallbackUses.push_back(CB.arg_begin() + CBCalleeIdx); in getCallbackUses() 56 : CB(dyn_cast<CallBase>(U->getUser())) { in AbstractCallSite() 59 if (!CB) { in AbstractCallSite() 68 CB = dyn_cast<CallBase>(U->getUser()); in AbstractCallSite() 71 if (!CB) { in AbstractCallSite() 79 if (CB->isCallee(U)) { in AbstractCallSite() 86 Function *Callee = CB->getCalledFunction(); in AbstractCallSite() [all …]
|
| H A D | ConvergenceVerifier.cpp | 20 const auto *CB = dyn_cast<CallBase>(&I); in getConvOp() local 21 if (!CB) in getConvOp() 23 switch (CB->getIntrinsicID()) { in getConvOp() 43 auto *CB = dyn_cast<CallBase>(&I); in findAndCheckConvergenceTokenUsed() local 44 if (!CB) in findAndCheckConvergenceTokenUsed() 48 CB->countOperandBundlesOfType(LLVMContext::OB_convergencectrl); in findAndCheckConvergenceTokenUsed() 51 {Context.print(CB)}); in findAndCheckConvergenceTokenUsed() 55 auto Bundle = CB->getOperandBundle(LLVMContext::OB_convergencectrl); in findAndCheckConvergenceTokenUsed() 59 {Context.print(CB)}); in findAndCheckConvergenceTokenUsed() 84 if (auto *CB = dyn_cast<CallBase>(&I)) { in isConvergent() local [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Transforms/IPO/ |
| H A D | DeadArgumentElimination.cpp | 179 CallBase *CB = dyn_cast<CallBase>(U); in deleteDeadVarargs() local 180 if (!CB) in deleteDeadVarargs() 184 Args.assign(CB->arg_begin(), CB->arg_begin() + NumArgs); in deleteDeadVarargs() 187 AttributeList PAL = CB->getAttributes(); in deleteDeadVarargs() 197 CB->getOperandBundlesAsDefs(OpBundles); in deleteDeadVarargs() 200 if (InvokeInst *II = dyn_cast<InvokeInst>(CB)) { in deleteDeadVarargs() 202 Args, OpBundles, "", CB->getIterator()); in deleteDeadVarargs() 204 NewCB = CallInst::Create(NF, Args, OpBundles, "", CB->getIterator()); in deleteDeadVarargs() 206 cast<CallInst>(CB)->getTailCallKind()); in deleteDeadVarargs() 208 NewCB->setCallingConv(CB->getCallingConv()); in deleteDeadVarargs() [all …]
|
| H A D | ModuleInliner.cpp | 159 if (auto *CB = dyn_cast<CallBase>(&I)) { in run() local 160 if (Function *Callee = CB->getCalledFunction()) { in run() 162 Calls->push({CB, -1}); in run() 165 setInlineRemark(*CB, "unavailable definition"); in run() 169 << NV("Caller", CB->getCaller()) in run() 175 CtxProf.isInSpecializedModule() && CB->isIndirectCall()) { in run() 176 CtxProfAnalysis::collectIndirectCallPromotionList(*CB, CtxProf, in run() 182 for (auto &[CB, Target] : ICPCandidates) { in run() 183 if (auto *DirectCB = promoteCallWithIfThenElse(*CB, *Target, CtxProf)) in run() 202 CallBase *CB = P.first; in run() local [all …]
|
| H A D | ArgumentPromotion.cpp | 227 CallBase &CB = cast<CallBase>(*F->user_back()); in doPromotion() local 228 assert(CB.getCalledFunction() == F); in doPromotion() 229 const AttributeList &CallPAL = CB.getAttributes(); in doPromotion() 230 IRBuilder<NoFolder> IRB(&CB); in doPromotion() 234 auto *AI = CB.arg_begin(); in doPromotion() 274 for (; AI != CB.arg_end(); ++AI, ++ArgNo) { in doPromotion() 280 CB.getOperandBundlesAsDefs(OpBundles); in doPromotion() 283 if (InvokeInst *II = dyn_cast<InvokeInst>(&CB)) { in doPromotion() 285 Args, OpBundles, "", CB.getIterator()); in doPromotion() 288 CallInst::Create(NF, Args, OpBundles, "", CB.getIterator()); in doPromotion() [all …]
|
| H A D | ExpandVariadics.cpp | 171 bool expandCall(Module &M, IRBuilder<> &Builder, CallBase *CB, FunctionType *, 253 bool expansionApplicableToFunctionCall(CallBase *CB) { in expansionApplicableToFunctionCall() argument 254 if (CallInst *CI = dyn_cast<CallInst>(CB)) { in expansionApplicableToFunctionCall() 266 if (isa<InvokeInst>(CB)) { in expansionApplicableToFunctionCall() 387 if (CallBase *CB = dyn_cast<CallBase>(&I)) { in runOnModule() local 388 if (CB->isIndirectCall()) { in runOnModule() 389 FunctionType *FTy = CB->getFunctionType(); in runOnModule() 391 Changed |= expandCall(M, Builder, CB, FTy, 0); in runOnModule() 440 if (CallBase *CB = dyn_cast<CallBase>(U)) { in runOnFunction() local 441 Value *CalledOperand = CB->getCalledOperand(); in runOnFunction() [all …]
|
| /freebsd/contrib/llvm-project/llvm/include/llvm/Analysis/ |
| H A D | ObjCARCUtil.h | 29 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() 58 inline bool attachedCallOpBundleNeedsMarker(const CallBase *CB) { in attachedCallOpBundleNeedsMarker() argument 60 if (std::optional<Function *> Fn = getAttachedARCFunction(CB)) in attachedCallOpBundleNeedsMarker() 75 inline ARCInstKind getAttachedARCFunctionKind(const CallBase *CB) { in getAttachedARCFunctionKind() argument 76 std::optional<Function *> Fn = getAttachedARCFunction(CB); in getAttachedARCFunctionKind()
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/AMDGPU/MCTargetDesc/ |
| H A D | R600MCCodeEmitter.cpp | 41 void encodeInstruction(const MCInst &MI, SmallVectorImpl<char> &CB, 51 void emit(uint32_t value, SmallVectorImpl<char> &CB) const; 52 void emit(uint64_t value, SmallVectorImpl<char> &CB) const; 86 SmallVectorImpl<char> &CB, in encodeInstruction() argument 104 emit(InstWord01, CB); in encodeInstruction() 105 emit(InstWord2, CB); in encodeInstruction() 106 emit((uint32_t)0, CB); in encodeInstruction() 123 emit(Word01, CB); in encodeInstruction() 124 emit(Word2, CB); in encodeInstruction() 125 emit((uint32_t)0, CB); in encodeInstruction() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Transforms/Instrumentation/ |
| H A D | IndirectCallPromotion.cpp | 353 const CallBase &CB, ArrayRef<InstrProfValueData> ValueDataRef, 359 bool tryToPromoteWithFuncCmp(CallBase &CB, Instruction *VPtr, 370 CallBase &CB, Instruction *VPtr, ArrayRef<PromotionCandidate> Candidates, 376 bool isProfitableToCompareVTables(const CallBase &CB, 390 Instruction *computeVTableInfos(const CallBase *CB, 397 void updateFuncValueProfiles(CallBase &CB, ArrayRef<InstrProfValueData> VDs, 426 const CallBase &CB, ArrayRef<InstrProfValueData> ValueDataRef, in getPromotionCandidatesForCallSite() argument 430 LLVM_DEBUG(dbgs() << " \nWork on callsite #" << NumOfPGOICallsites << CB in getPromotionCandidatesForCallSite() 447 if (ICPInvokeOnly && isa<CallInst>(CB)) { in getPromotionCandidatesForCallSite() 450 return OptimizationRemarkMissed(DEBUG_TYPE, "UserOptions", &CB) in getPromotionCandidatesForCallSite() [all …]
|
| /freebsd/contrib/llvm-project/llvm/include/llvm/Transforms/Utils/ |
| H A D | CallPromotionUtils.h | 36 LLVM_ABI bool isLegalToPromote(const CallBase &CB, Function *Callee, 46 LLVM_ABI CallBase &promoteCall(CallBase &CB, Function *Callee, 58 LLVM_ABI CallBase &promoteCallWithIfThenElse(CallBase &CB, Function *Callee, 61 LLVM_ABI CallBase *promoteCallWithIfThenElse(CallBase &CB, Function &Callee, 75 LLVM_ABI CallBase &promoteCallWithVTableCmp(CallBase &CB, Instruction *VPtr, 101 LLVM_ABI bool tryPromoteCall(CallBase &CB); 110 LLVM_ABI CallBase &versionCallSite(CallBase &CB, Value *Callee,
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/WebAssembly/ |
| H A D | WebAssemblyOptimizeReturned.cpp | 45 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()
|