Lines Matching refs:TLI
102 const TargetLibraryInfo *TLI, in getAllocationData() argument
134 if (!TLI || !TLI->getLibFunc(FnName, TLIFn) || !TLI->has(TLIFn)) in getAllocationData()
176 bool llvm::isAllocationFn(const Value *V, const TargetLibraryInfo *TLI, in isAllocationFn() argument
178 return getAllocationData(V, AnyAlloc, TLI, LookThroughBitCast).hasValue(); in isAllocationFn()
183 bool llvm::isNoAliasFn(const Value *V, const TargetLibraryInfo *TLI, in isNoAliasFn() argument
187 return isAllocationFn(V, TLI, LookThroughBitCast) || in isNoAliasFn()
193 bool llvm::isMallocLikeFn(const Value *V, const TargetLibraryInfo *TLI, in isMallocLikeFn() argument
195 return getAllocationData(V, MallocLike, TLI, LookThroughBitCast).hasValue(); in isMallocLikeFn()
200 bool llvm::isCallocLikeFn(const Value *V, const TargetLibraryInfo *TLI, in isCallocLikeFn() argument
202 return getAllocationData(V, CallocLike, TLI, LookThroughBitCast).hasValue(); in isCallocLikeFn()
207 bool llvm::isAllocLikeFn(const Value *V, const TargetLibraryInfo *TLI, in isAllocLikeFn() argument
209 return getAllocationData(V, AllocLike, TLI, LookThroughBitCast).hasValue(); in isAllocLikeFn()
216 const TargetLibraryInfo *TLI) { in extractMallocCall() argument
217 return isMallocLikeFn(I, TLI) ? dyn_cast<CallInst>(I) : nullptr; in extractMallocCall()
221 const TargetLibraryInfo *TLI, in computeArraySize() argument
227 Type *T = getMallocAllocatedType(CI, TLI); in computeArraySize()
251 const TargetLibraryInfo *TLI) { in getMallocType() argument
252 assert(isMallocLikeFn(CI, TLI) && "getMallocType and not malloc call"); in getMallocType()
283 const TargetLibraryInfo *TLI) { in getMallocAllocatedType() argument
284 PointerType *PT = getMallocType(CI, TLI); in getMallocAllocatedType()
294 const TargetLibraryInfo *TLI, in getMallocArraySize() argument
296 assert(isMallocLikeFn(CI, TLI) && "getMallocArraySize and not malloc call"); in getMallocArraySize()
297 return computeArraySize(CI, DL, TLI, LookThroughSExt); in getMallocArraySize()
304 const TargetLibraryInfo *TLI) { in extractCallocCall() argument
305 return isCallocLikeFn(I, TLI) ? cast<CallInst>(I) : nullptr; in extractCallocCall()
310 const CallInst *llvm::isFreeCall(const Value *I, const TargetLibraryInfo *TLI) { in isFreeCall() argument
320 if (!TLI || !TLI->getLibFunc(FnName, TLIFn) || !TLI->has(TLIFn)) in isFreeCall()
380 const TargetLibraryInfo *TLI, bool RoundToAlign, in getObjectSize() argument
382 ObjectSizeOffsetVisitor Visitor(DL, TLI, Ptr->getContext(), in getObjectSize()
405 const TargetLibraryInfo *TLI, in ObjectSizeOffsetVisitor() argument
409 : DL(DL), TLI(TLI), RoundToAlign(RoundToAlign), Mode(Mode) { in ObjectSizeOffsetVisitor()
480 getAllocationData(CS.getInstruction(), AnyAlloc, TLI); in visitCallSite()
644 const DataLayout &DL, const TargetLibraryInfo *TLI, LLVMContext &Context, in ObjectSizeOffsetEvaluator() argument
646 : DL(DL), TLI(TLI), Context(Context), Builder(Context, TargetFolder(DL)), in ObjectSizeOffsetEvaluator()
676 ObjectSizeOffsetVisitor Visitor(DL, TLI, Context, RoundToAlign); in compute_()
740 getAllocationData(CS.getInstruction(), AnyAlloc, TLI); in visitCallSite()