LLVM  4.0.0
Classes | Namespaces | Typedefs | Enumerations | Functions
MemoryBuiltins.h File Reference
#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"
Include dependency graph for MemoryBuiltins.h:
This graph shows which files directly or indirectly include this file:

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. More...
 
class  llvm::ObjectSizeOffsetEvaluator
 Evaluate the size and offset of an object pointed to by a Value*. More...
 

Namespaces

 llvm
 Compute iterated dominance frontiers using a linear time algorithm.
 

Typedefs

typedef std::pair< APInt, APInt > llvm::SizeOffsetType
 
typedef std::pair< Value
*, Value * > 
llvm::SizeOffsetEvalType
 

Enumerations

enum  llvm::ObjSizeMode { llvm::ObjSizeMode::Exact = 0, llvm::ObjSizeMode::Min = 1, llvm::ObjSizeMode::Max = 2 }
 

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). More...
 
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). More...
 
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). More...
 
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). More...
 
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). More...
 
const CallInstllvm::extractMallocCall (const Value *I, const TargetLibraryInfo *TLI)
 extractMallocCall - Returns the corresponding CallInst if the instruction is a malloc call. More...
 
static CallInst * llvm::extractMallocCall (Value *I, const TargetLibraryInfo *TLI)
 
PointerTypellvm::getMallocType (const CallInst *CI, const TargetLibraryInfo *TLI)
 getMallocType - Returns the PointerType resulting from the malloc call. More...
 
Typellvm::getMallocAllocatedType (const CallInst *CI, const TargetLibraryInfo *TLI)
 getMallocAllocatedType - Returns the Type allocated by malloc call. More...
 
Valuellvm::getMallocArraySize (CallInst *CI, const DataLayout &DL, const TargetLibraryInfo *TLI, bool LookThroughSExt=false)
 getMallocArraySize - Returns the array size of a malloc call. More...
 
const CallInstllvm::extractCallocCall (const Value *I, const TargetLibraryInfo *TLI)
 extractCallocCall - Returns the corresponding CallInst if the instruction is a calloc call. More...
 
static CallInst * llvm::extractCallocCall (Value *I, const TargetLibraryInfo *TLI)
 
const CallInstllvm::isFreeCall (const Value *I, const TargetLibraryInfo *TLI)
 isFreeCall - Returns non-null if the value is a call to the builtin free() More...
 
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, ObjSizeMode Mode=ObjSizeMode::Exact)
 Compute the size of the object pointed by Ptr. More...
 
ConstantIntllvm::lowerObjectSizeCall (IntrinsicInst *ObjectSize, const DataLayout &DL, const TargetLibraryInfo *TLI, bool MustSucceed)
 Try to turn a call to .objectsize into an integer value of the given Type. More...