ΒΆbool isRemovableAlloc(
const llvm::CallBase* V,
const llvm::TargetLibraryInfo* TLI)
bool isRemovableAlloc(
const llvm::CallBase* V,
const llvm::TargetLibraryInfo* TLI)
Description
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. Ex: If our allocation routine has a counter for the number of objects allocated, and the program prints it on exit, can the value change due to optimization? Answer is highly language dependent. Note: *Removable* really does mean removable; it does not mean observable. A language (e.g. C++) can allow removing allocations without allowing insertion or speculative execution of allocation routines.
Declared at: llvm/include/llvm/Analysis/MemoryBuiltins.h:97
Parameters
- const llvm::CallBase* V
- const llvm::TargetLibraryInfo* TLI