Lines Matching defs:TLI

181                              const TargetLibraryInfo *TLI) {
182 // Don't perform a slow TLI lookup, if this function doesn't return a pointer
189 if (!TLI || !TLI->getLibFunc(*Callee, TLIFn) || !TLI->has(TLIFn))
223 const TargetLibraryInfo *TLI) {
227 return getAllocationDataForFunction(Callee, AllocTy, TLI);
243 getAllocationSize(const Value *V, const TargetLibraryInfo *TLI) {
254 getAllocationDataForFunction(Callee, AnyAlloc, TLI))
299 bool llvm::isAllocationFn(const Value *V, const TargetLibraryInfo *TLI) {
300 return getAllocationData(V, AnyAlloc, TLI).has_value() ||
312 bool llvm::isNewLikeFn(const Value *V, const TargetLibraryInfo *TLI) {
313 return getAllocationData(V, OpNewLike, TLI).has_value();
318 bool llvm::isMallocOrCallocLikeFn(const Value *V, const TargetLibraryInfo *TLI) {
320 return getAllocationData(V, MallocOrOpNewLike, TLI).has_value();
325 bool llvm::isAllocLikeFn(const Value *V, const TargetLibraryInfo *TLI) {
326 return getAllocationData(V, AllocLike, TLI).has_value() ||
342 bool llvm::isRemovableAlloc(const CallBase *CB, const TargetLibraryInfo *TLI) {
350 return isAllocLikeFn(CB, TLI);
354 const TargetLibraryInfo *TLI) {
355 const std::optional<AllocFnsTy> FnData = getAllocationData(V, AnyAlloc, TLI);
379 llvm::getAllocSize(const CallBase *CB, const TargetLibraryInfo *TLI,
383 std::optional<AllocFnsTy> FnData = getAllocationSize(CB, TLI);
441 const TargetLibraryInfo *TLI,
448 if (getAllocationData(Alloc, MallocOrOpNewLike, TLI).has_value())
512 llvm::getAllocationFamily(const Value *I, const TargetLibraryInfo *TLI) {
519 if (TLI && TLI->getLibFunc(*Callee, TLIFn) && TLI->has(TLIFn)) {
521 const auto AllocData = getAllocationDataForFunction(Callee, AnyAlloc, TLI);
558 Value *llvm::getFreedOperand(const CallBase *CB, const TargetLibraryInfo *TLI) {
565 if (TLI && TLI->getLibFunc(*Callee, TLIFn) && TLI->has(TLIFn) &&
593 const TargetLibraryInfo *TLI, ObjectSizeOpts Opts) {
594 ObjectSizeOffsetVisitor Visitor(DL, TLI, Ptr->getContext(), Opts);
605 const TargetLibraryInfo *TLI,
607 return lowerObjectSizeCall(ObjectSize, DL, TLI, /*AAResults=*/nullptr,
613 const TargetLibraryInfo *TLI, AAResults *AA, bool MustSucceed,
639 if (getObjectSize(ObjectSize->getArgOperand(0), Size, DL, TLI, EvalOptions) &&
644 ObjectSizeOffsetEvaluator Eval(DL, TLI, Ctx, EvalOptions);
693 const TargetLibraryInfo *TLI,
696 : DL(DL), TLI(TLI), Options(Options) {
815 if (std::optional<APInt> Size = getAllocSize(&CB, TLI))
919 if (!TLI || !TLI->getLibFunc(*CB->getCalledFunction(), TLIFn) ||
920 !TLI->has(TLIFn))
1045 const DataLayout &DL, const TargetLibraryInfo *TLI, LLVMContext &Context,
1047 : DL(DL), TLI(TLI), Context(Context),
1087 ObjectSizeOffsetVisitor Visitor(DL, TLI, Context, EvalOpts);
1159 std::optional<AllocFnsTy> FnData = getAllocationSize(&CB, TLI);