X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FAnalysis%2FAliasDebugger.cpp;h=6868e3f2cef26d76e85733eab47715aa9a254720;hb=f648125be9385a0d4abfd5e77ea3dd40694c4c07;hp=dd766e90d796bd0392ec0dc97f4201344ba253c9;hpb=4ee451de366474b9c228b4e5fa573795a715216d;p=oota-llvm.git diff --git a/lib/Analysis/AliasDebugger.cpp b/lib/Analysis/AliasDebugger.cpp index dd766e90d79..6868e3f2cef 100644 --- a/lib/Analysis/AliasDebugger.cpp +++ b/lib/Analysis/AliasDebugger.cpp @@ -23,14 +23,12 @@ #include "llvm/Constants.h" #include "llvm/DerivedTypes.h" #include "llvm/Analysis/AliasAnalysis.h" -#include "llvm/Support/Compiler.h" #include using namespace llvm; namespace { - class VISIBILITY_HIDDEN AliasDebugger - : public ModulePass, public AliasAnalysis { + class AliasDebugger : public ModulePass, public AliasAnalysis { //What we do is simple. Keep track of every value the AA could //know about, and verify that queries are one of those. @@ -41,7 +39,7 @@ namespace { public: static char ID; // Class identification, replacement for typeinfo - AliasDebugger() : ModulePass((intptr_t)&ID) {} + AliasDebugger() : ModulePass(&ID) {} bool runOnModule(Module &M) { InitializeAliasAnalysis(this); // set up super class @@ -92,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); @@ -121,11 +105,12 @@ namespace { } }; - - char AliasDebugger::ID = 0; - 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(); }