LLVM API Documentation

GlobalsModRef.cpp File Reference

#include "llvm/Analysis/Passes.h"
#include "llvm/Module.h"
#include "llvm/Pass.h"
#include "llvm/Instructions.h"
#include "llvm/Constants.h"
#include "llvm/DerivedTypes.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Analysis/CallGraph.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/InstIterator.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.

Defines

#define DEBUG_TYPE   "globalsmodref-aa"

Functions

 STATISTIC (NumNonAddrTakenGlobalVars,"Number of global vars without address taken")
 STATISTIC (NumNonAddrTakenFunctions,"Number of functions without address taken")
 STATISTIC (NumNoMemFunctions,"Number of functions that do not access memory")
 STATISTIC (NumReadMemFunctions,"Number of functions that only read memory")
 STATISTIC (NumIndirectGlobalVars,"Number of indirect global objects")
Passllvm::createGlobalsModRefPass ()

Variables

static RegisterPass
< GlobalsModRef > 
X ("globalsmodref-aa","Simple mod/ref analysis for globals", false, true)
static RegisterAnalysisGroup
< AliasAnalysis
Y (X)


Define Documentation

#define DEBUG_TYPE   "globalsmodref-aa"

Definition at line 17 of file GlobalsModRef.cpp.


Function Documentation

STATISTIC ( NumIndirectGlobalVars  ,
"Number of indirect global objects"   
)

STATISTIC ( NumReadMemFunctions  ,
"Number of functions that only read memory"   
)

STATISTIC ( NumNoMemFunctions  ,
"Number of functions that do not access memory"   
)

STATISTIC ( NumNonAddrTakenFunctions  ,
"Number of functions without address taken"   
)

STATISTIC ( NumNonAddrTakenGlobalVars  ,
"Number of global vars without address taken"   
)


Variable Documentation

AllocsForIndirectGlobals - If an instruction allocates memory for an indirect global, this map indicates which one.

Definition at line 83 of file GlobalsModRef.cpp.

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 65 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 87 of file GlobalsModRef.cpp.

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 50 of file GlobalsModRef.cpp.

char ID [static]

Definition at line 90 of file GlobalsModRef.cpp.

IndirectGlobals - The memory pointed to by this global is known to be 'owned' by the global.

Definition at line 79 of file GlobalsModRef.cpp.

MayReadAnyGlobal - May read global variables, but it is not known which.

Definition at line 53 of file GlobalsModRef.cpp.

NonAddressTakenGlobals - The globals that do not have their addresses taken.

Definition at line 75 of file GlobalsModRef.cpp.

RegisterPass<GlobalsModRef> X("globalsmodref-aa","Simple mod/ref analysis for globals", false, true) [static]




This web site is hosted by the Computer Science Department at the University of Illinois at Urbana-Champaign.