LLVM API Documentation
#include "llvm/Analysis/Passes.h"
#include "llvm/Module.h"
#include "llvm/Pass.h"
#include "llvm/Instructions.h"
#include "llvm/Constants.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Analysis/CallGraph.h"
#include "llvm/Support/InstIterator.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/ADT/SCCIterator.h"
#include <set>
Include dependency graph for GlobalsModRef.cpp:
Go to the source code of this file.
Functions | |
Pass * | llvm::createGlobalsModRefPass () |
static const GlobalValue * | getUnderlyingObject (const Value *V) |
Variables | |
Statistic | NumNonAddrTakenGlobalVars ("globalsmodref-aa","Number of global vars without address taken") |
Statistic | NumNonAddrTakenFunctions ("globalsmodref-aa","Number of functions without address taken") |
Statistic | NumNoMemFunctions ("globalsmodref-aa","Number of functions that do not access memory") |
Statistic | NumReadMemFunctions ("globalsmodref-aa","Number of functions that only read memory") |
RegisterOpt< GlobalsModRef > | X ("globalsmodref-aa","Simple mod/ref analysis for globals") |
RegisterAnalysisGroup< AliasAnalysis, GlobalsModRef > | Y |
static const GlobalValue* getUnderlyingObject | ( | const Value * | V | ) | [static] |
getUnderlyingObject - This traverses the use chain to figure out what object the specified value points to. If the value points to, or is derived from, a global object, return it.
Definition at line 334 of file GlobalsModRef.cpp.
References getUnderlyingObject(), GV, and V.
unsigned FunctionEffect |
FunctionEffect - Capture whether or not this function reads or writes to ANY memory. If not, we can do a lot of aggressive analysis on it.
Definition at line 64 of file GlobalsModRef.cpp.
std::map<Function*, FunctionRecord> FunctionInfo |
FunctionInfo - For each function, keep track of what globals are modified or read.
Definition at line 77 of file GlobalsModRef.cpp.
std::map<GlobalValue*, unsigned> GlobalInfo |
GlobalInfo - Maintain mod/ref info for all of the globals without addresses taken that are read or written (transitively) by this function.
Definition at line 53 of file GlobalsModRef.cpp.
std::set<GlobalValue*> NonAddressTakenGlobals |
NonAddressTakenGlobals - The globals that do not have their addresses taken.
Definition at line 73 of file GlobalsModRef.cpp.
Statistic NumNoMemFunctions("globalsmodref-aa","Number of functions that do not access memory") [static] |
Statistic NumNonAddrTakenFunctions("globalsmodref-aa","Number of functions without address taken") [static] |
Statistic NumNonAddrTakenGlobalVars("globalsmodref-aa","Number of global vars without address taken") [static] |
Statistic NumReadMemFunctions("globalsmodref-aa","Number of functions that only read memory") [static] |
RegisterOpt<GlobalsModRef> X("globalsmodref-aa","Simple mod/ref analysis for globals") [static] |
RegisterAnalysisGroup<AliasAnalysis, GlobalsModRef> Y [static] |
Definition at line 140 of file GlobalsModRef.cpp.