LLVM API Documentation
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/Analysis/TargetFolder.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/InstVisitor.h"
#include "llvm/IR/Operator.h"
#include "llvm/IR/ValueHandle.h"
#include "llvm/Support/DataTypes.h"
Go to the source code of this file.
Classes | |
class | llvm::ObjectSizeOffsetVisitor |
Evaluate the size and offset of an object pointed to by a Value* statically. Fails if size or offset are not known at compile time. More... | |
class | llvm::ObjectSizeOffsetEvaluator |
Evaluate the size and offset of an object pointed to by a Value*. May create code to compute the result at run-time. More... | |
Namespaces | |
namespace | llvm |
List of target independent CodeGen pass IDs. | |
Typedefs | |
typedef std::pair< APInt, APInt > | llvm::SizeOffsetType |
typedef std::pair< Value *, Value * > | llvm::SizeOffsetEvalType |
Functions | |
bool | llvm::isAllocationFn (const Value *V, const TargetLibraryInfo *TLI, bool LookThroughBitCast=false) |
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::isNoAliasFn (const Value *V, const TargetLibraryInfo *TLI, bool LookThroughBitCast=false) |
Tests if a value is a call or invoke to a function that returns a NoAlias pointer (including malloc/calloc/realloc/strdup-like functions). | |
bool | llvm::isMallocLikeFn (const Value *V, const TargetLibraryInfo *TLI, bool LookThroughBitCast=false) |
Tests if a value is a call or invoke to a library function that allocates uninitialized memory (such as malloc). | |
bool | llvm::isCallocLikeFn (const Value *V, const TargetLibraryInfo *TLI, bool LookThroughBitCast=false) |
Tests if a value is a call or invoke to a library function that allocates zero-filled memory (such as calloc). | |
bool | llvm::isAllocLikeFn (const Value *V, const TargetLibraryInfo *TLI, bool LookThroughBitCast=false) |
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 Value *V, const TargetLibraryInfo *TLI, bool LookThroughBitCast=false) |
Tests if a value is a call or invoke to a library function that reallocates memory (such as realloc). | |
bool | llvm::isOperatorNewLikeFn (const Value *V, const TargetLibraryInfo *TLI, bool LookThroughBitCast=false) |
Tests if a value is a call or invoke to a library function that allocates memory and never returns null (such as operator new). | |
const CallInst * | llvm::extractMallocCall (const Value *I, const TargetLibraryInfo *TLI) |
static CallInst * | llvm::extractMallocCall (Value *I, const TargetLibraryInfo *TLI) |
const CallInst * | llvm::isArrayMalloc (const Value *I, const DataLayout *DL, const TargetLibraryInfo *TLI) |
PointerType * | llvm::getMallocType (const CallInst *CI, const TargetLibraryInfo *TLI) |
Type * | llvm::getMallocAllocatedType (const CallInst *CI, const TargetLibraryInfo *TLI) |
Value * | llvm::getMallocArraySize (CallInst *CI, const DataLayout *DL, const TargetLibraryInfo *TLI, bool LookThroughSExt=false) |
const CallInst * | llvm::extractCallocCall (const Value *I, const TargetLibraryInfo *TLI) |
static CallInst * | llvm::extractCallocCall (Value *I, const TargetLibraryInfo *TLI) |
const CallInst * | llvm::isFreeCall (const Value *I, const TargetLibraryInfo *TLI) |
isFreeCall - Returns non-null if the value is a call to the builtin free() | |
static CallInst * | llvm::isFreeCall (Value *I, const TargetLibraryInfo *TLI) |
bool | llvm::getObjectSize (const Value *Ptr, uint64_t &Size, const DataLayout *DL, const TargetLibraryInfo *TLI, bool RoundToAlign=false) |
Compute the size of the object pointed by Ptr. Returns true and the object size in Size if successful, and false otherwise. In this context, by object we mean the region of memory starting at Ptr to the end of the underlying object pointed to by Ptr. If RoundToAlign is true, then Size is rounded up to the aligment of allocas, byval arguments, and global variables. |