|
bool | llvm::isAllocationFn (const Value *V, const TargetLibraryInfo *TLI) |
| Tests if a value is a call or invoke to a library function that allocates or reallocates memory (either malloc, calloc, realloc, or strdup like).
|
|
bool | llvm::isAllocationFn (const Value *V, function_ref< const TargetLibraryInfo &(Function &)> GetTLI) |
|
bool | llvm::isNewLikeFn (const Value *V, const TargetLibraryInfo *TLI) |
| Tests if a value is a call or invoke to a library function that allocates memory via new.
|
|
bool | llvm::isMallocOrCallocLikeFn (const Value *V, const TargetLibraryInfo *TLI) |
| Tests if a value is a call or invoke to a library function that allocates memory similar to malloc or calloc.
|
|
bool | llvm::isAllocLikeFn (const Value *V, const TargetLibraryInfo *TLI) |
| Tests if a value is a call or invoke to a library function that allocates memory (either malloc, calloc, or strdup like).
|
|
bool | llvm::isReallocLikeFn (const Function *F) |
| Tests if a function is a call or invoke to a library function that reallocates memory (e.g., realloc).
|
|
Value * | llvm::getReallocatedOperand (const CallBase *CB) |
| If this is a call to a realloc function, return the reallocated operand.
|
|
bool | llvm::isLibFreeFunction (const Function *F, const LibFunc TLIFn) |
| isLibFreeFunction - Returns true if the function is a builtin free()
|
|
Value * | llvm::getFreedOperand (const CallBase *CB, const TargetLibraryInfo *TLI) |
| If this if a call to a free function, return the freed operand.
|
|
bool | llvm::isRemovableAlloc (const CallBase *V, const TargetLibraryInfo *TLI) |
| Return true if this is a call to an allocation function that does not have side effects that we are required to preserve beyond the effect of allocating a new object.
|
|
Value * | llvm::getAllocAlignment (const CallBase *V, const TargetLibraryInfo *TLI) |
| Gets the alignment argument for an aligned_alloc-like function, using either built-in knowledge based on fuction names/signatures or allocalign attributes.
|
|
std::optional< APInt > | llvm::getAllocSize (const CallBase *CB, const TargetLibraryInfo *TLI, function_ref< const Value *(const Value *)> Mapper=[](const Value *V) { return V;}) |
| Return the size of the requested allocation.
|
|
Constant * | llvm::getInitialValueOfAllocation (const Value *V, const TargetLibraryInfo *TLI, Type *Ty) |
| If this is a call to an allocation function that initializes memory to a fixed value, return said value in the requested type.
|
|
std::optional< StringRef > | llvm::getAllocationFamily (const Value *I, const TargetLibraryInfo *TLI) |
| If a function is part of an allocation family (e.g.
|
|
bool | llvm::getObjectSize (const Value *Ptr, uint64_t &Size, const DataLayout &DL, const TargetLibraryInfo *TLI, ObjectSizeOpts Opts={}) |
| Compute the size of the object pointed by Ptr.
|
|
Value * | llvm::lowerObjectSizeCall (IntrinsicInst *ObjectSize, const DataLayout &DL, const TargetLibraryInfo *TLI, bool MustSucceed) |
| Try to turn a call to @llvm.objectsize into an integer value of the given Type.
|
|
Value * | llvm::lowerObjectSizeCall (IntrinsicInst *ObjectSize, const DataLayout &DL, const TargetLibraryInfo *TLI, AAResults *AA, bool MustSucceed, SmallVectorImpl< Instruction * > *InsertedInstructions=nullptr) |
|