Lines Matching refs:Const
54 static const AllocFnsTy AllocationFnData[] = {
74 static Function *getCalledFunction(const Value *V, bool LookThroughBitCast) {
93 static const AllocFnsTy *getAllocationData(const Value *V, AllocType AllocTy,
94 const TargetLibraryInfo *TLI,
121 const AllocFnsTy *FnData = &AllocationFnData[i];
142 static bool hasNoAliasAttr(const Value *V, bool LookThroughBitCast) {
151 bool llvm::isAllocationFn(const Value *V, const TargetLibraryInfo *TLI,
158 bool llvm::isNoAliasFn(const Value *V, const TargetLibraryInfo *TLI,
168 bool llvm::isMallocLikeFn(const Value *V, const TargetLibraryInfo *TLI,
175 bool llvm::isCallocLikeFn(const Value *V, const TargetLibraryInfo *TLI,
182 bool llvm::isAllocLikeFn(const Value *V, const TargetLibraryInfo *TLI,
189 bool llvm::isReallocLikeFn(const Value *V, const TargetLibraryInfo *TLI,
196 bool llvm::isOperatorNewLikeFn(const Value *V, const TargetLibraryInfo *TLI,
204 const CallInst *llvm::extractMallocCall(const Value *I,
205 const TargetLibraryInfo *TLI) {
209 static Value *computeArraySize(const CallInst *CI, const DataLayout *DL,
210 const TargetLibraryInfo *TLI,
238 const CallInst *llvm::isArrayMalloc(const Value *I,
239 const DataLayout *DL,
240 const TargetLibraryInfo *TLI) {
241 const CallInst *CI = extractMallocCall(I, TLI);
257 PointerType *llvm::getMallocType(const CallInst *CI,
258 const TargetLibraryInfo *TLI) {
267 if (const BitCastInst *BCI = dyn_cast<BitCastInst>(*UI++)) {
289 Type *llvm::getMallocAllocatedType(const CallInst *CI,
290 const TargetLibraryInfo *TLI) {
300 Value *llvm::getMallocArraySize(CallInst *CI, const DataLayout *DL,
301 const TargetLibraryInfo *TLI,
310 const CallInst *llvm::extractCallocCall(const Value *I,
311 const TargetLibraryInfo *TLI) {
317 const CallInst *llvm::isFreeCall(const Value *I, const TargetLibraryInfo *TLI) {
318 const CallInst *CI = dyn_cast<CallInst>(I);
366 bool llvm::getObjectSize(const Value *Ptr, uint64_t &Size, const DataLayout *DL,
367 const TargetLibraryInfo *TLI, bool RoundToAlign) {
398 ObjectSizeOffsetVisitor::ObjectSizeOffsetVisitor(const DataLayout *DL,
399 const TargetLibraryInfo *TLI,
453 if (const ConstantInt *C = dyn_cast<ConstantInt>(ArraySize)) {
472 const AllocFnsTy *FnData = getAllocationData(CS.getInstruction(), AnyAlloc,
592 ObjectSizeOffsetEvaluator::ObjectSizeOffsetEvaluator(const DataLayout *DL,
593 const TargetLibraryInfo *TLI,
627 SizeOffsetType Const = Visitor.compute(V);
628 if (Visitor.bothKnown(Const))
629 return std::make_pair(ConstantInt::get(Context, Const.first),
630 ConstantInt::get(Context, Const.second));
692 const AllocFnsTy *FnData = getAllocationData(CS.getInstruction(), AnyAlloc,