X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FAnalysis%2FAliasDebugger.cpp;h=6868e3f2cef26d76e85733eab47715aa9a254720;hb=f648125be9385a0d4abfd5e77ea3dd40694c4c07;hp=d9da70d52162d6075165d12d22001ab70239ba73;hpb=5cbf985dcbc89fba3208e7baf8b6f488b06d3ec9;p=oota-llvm.git diff --git a/lib/Analysis/AliasDebugger.cpp b/lib/Analysis/AliasDebugger.cpp index d9da70d5216..6868e3f2cef 100644 --- a/lib/Analysis/AliasDebugger.cpp +++ b/lib/Analysis/AliasDebugger.cpp @@ -2,8 +2,8 @@ // // The LLVM Compiler Infrastructure // -// This file was developed by Andrew Lenharth and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // @@ -38,6 +38,9 @@ namespace { std::set Vals; public: + static char ID; // Class identification, replacement for typeinfo + AliasDebugger() : ModulePass(&ID) {} + bool runOnModule(Module &M) { InitializeAliasAnalysis(this); // set up super class @@ -87,25 +90,11 @@ namespace { return AliasAnalysis::getModRefInfo(CS1,CS2); } - void getMustAliases(Value *P, std::vector &RetVals) { - assert(Vals.find(P) != Vals.end() && "Never seen value in AA before"); - return AliasAnalysis::getMustAliases(P, RetVals); - } - bool pointsToConstantMemory(const Value *P) { assert(Vals.find(P) != Vals.end() && "Never seen value in AA before"); return AliasAnalysis::pointsToConstantMemory(P); } - /// getModRefBehavior - Return the behavior of the specified function if - /// called from the specified call site. The call site may be null in which - /// case the most generic behavior of this function should be returned. - virtual ModRefBehavior getModRefBehavior(Function *F, CallSite CS, - std::vector *Info) { - assert(Vals.find(F) != Vals.end() && "Never seen value in AA before"); - return AliasAnalysis::getModRefBehavior(F, CS, Info); - } - virtual void deleteValue(Value *V) { assert(Vals.find(V) != Vals.end() && "Never seen value in AA before"); AliasAnalysis::deleteValue(V); @@ -116,10 +105,12 @@ namespace { } }; - - RegisterPass X("debug-aa", "AA use debugger"); - RegisterAnalysisGroup Y(X); } +char AliasDebugger::ID = 0; +static RegisterPass +X("debug-aa", "AA use debugger", false, true); +static RegisterAnalysisGroup Y(X); + Pass *llvm::createAliasDebugger() { return new AliasDebugger(); }