LLVM  6.0.0svn
Classes | Namespaces | Typedefs | Functions
MemoryBuiltins.h File Reference
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/Analysis/TargetFolder.h"
#include "llvm/IR/CallSite.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/InstVisitor.h"
#include "llvm/IR/ValueHandle.h"
#include <cstdint>
#include <utility>
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

struct  llvm::ObjectSizeOpts
 Various options to control the behavior of getObjectSize. More...
 
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

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

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::isMallocOrCallocLikeFn (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 similar to malloc or 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...
 
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...
 
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...
 
CallInst * llvm::isFreeCall (Value *I, const TargetLibraryInfo *TLI)
 
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. 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...