38 std::set<const Value*> Vals;
46 bool runOnModule(
Module &M) {
47 InitializeAliasAnalysis(
this);
53 OE =
I->op_end(); OI != OE; ++OI)
58 E = M.
end();
I != E; ++
I){
60 if(!
I->isDeclaration()) {
70 OE = BI->op_end(); OI != OE; ++OI)
88 virtual void *getAdjustedAnalysisPointer(
AnalysisID PI) {
97 AliasResult alias(
const Location &LocA,
const Location &LocB) {
98 assert(Vals.find(LocA.Ptr) != Vals.end() &&
99 "Never seen value in AA before");
100 assert(Vals.find(LocB.Ptr) != Vals.end() &&
101 "Never seen value in AA before");
106 const Location &Loc) {
107 assert(Vals.find(Loc.Ptr) != Vals.end() &&
"Never seen value in AA before");
116 bool pointsToConstantMemory(
const Location &Loc,
bool OrLocal) {
117 assert(Vals.find(Loc.Ptr) != Vals.end() &&
"Never seen value in AA before");
121 virtual void deleteValue(
Value *V) {
122 assert(Vals.find(V) != Vals.end() &&
"Never seen value in AA before");
125 virtual void copyValue(
Value *From,
Value *To) {
135 "AA use debugger",
false,
true,
false)
virtual bool pointsToConstantMemory(const Location &Loc, bool OrLocal=false)
static PassRegistry * getPassRegistry()
ModRefResult getModRefInfo(const Instruction *I, const Location &Loc)
The main container class for the LLVM Intermediate Representation.
INITIALIZE_AG_PASS(AliasDebugger, AliasAnalysis,"debug-aa","AA use debugger", false, true, false) Pass *llvm
ID
LLVM Calling Convention Representation.
virtual void copyValue(Value *From, Value *To)
global_iterator global_begin()
void initializeAliasDebuggerPass(PassRegistry &)
virtual AliasResult alias(const Location &LocA, const Location &LocB)
virtual void deleteValue(Value *V)
global_iterator global_end()
ImmutableCallSite - establish a view to a call site for examination.
Pass * createAliasDebugger()
LLVM Value Representation.
virtual void getAnalysisUsage(AnalysisUsage &AU) const