36 void releaseMemory()
override {
44 "Memory Dereferenciblity of pointers in function",
false,
true)
49 return new MemDerefPrinter();
52 bool MemDerefPrinter::runOnFunction(
Function &
F) {
55 if (
LoadInst *LI = dyn_cast<LoadInst>(&
I)) {
56 Value *PO = LI->getPointerOperand();
65 OS <<
"The following are dereferenceable:\n";
A parsed version of the target data layout string in and methods for querying it. ...
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
A Module instance is used to store all the information related to an LLVM module. ...
This class provides various memory handling functions that manipulate MemoryBlock instances...
print Memory Dereferenciblity of pointers in false
LoadInst - an instruction for reading from memory.
print Memory Dereferenciblity of pointers in function
bool isDereferenceablePointer(const Value *V, const DataLayout &DL, const Instruction *CtxI=nullptr, const DominatorTree *DT=nullptr, const TargetLibraryInfo *TLI=nullptr)
isDereferenceablePointer - Return true if this is always a dereferenceable pointer.
#define INITIALIZE_PASS_END(passName, arg, name, cfg, analysis)
INITIALIZE_PASS_BEGIN(MemDerefPrinter,"print-memderefs","Memory Dereferenciblity of pointers in function", false, true) INITIALIZE_PASS_END(MemDerefPrinter
void initializeMemDerefPrinterPass(PassRegistry &)
Represent the analysis usage information of a pass.
FunctionPass class - This class is used to implement most global optimizations.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
Module.h This file contains the declarations for the Module class.
void setPreservesAll()
Set by analyses that do not transform their input at all.
const DataLayout & getDataLayout() const
Get the data layout for the module's target platform.
iterator_range< inst_iterator > inst_range(Function *F)
Module * getParent()
Get the module that this global value is contained inside of...
LLVM Value Representation.
This class implements an extremely fast bulk output stream that can only output to a stream...
FunctionPass * createMemDerefPrinter()