From: Chris Lattner Date: Sat, 12 Mar 2005 12:08:52 +0000 (+0000) Subject: remove this from the PA namespace, leaving it in the llvm ns X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b25959a63210f66f8e6f742ae7ecd933dcf75cbb;p=oota-llvm.git remove this from the PA namespace, leaving it in the llvm ns git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20574 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Analysis/DataStructure/EquivClassGraphs.h b/include/llvm/Analysis/DataStructure/EquivClassGraphs.h index 712c55f280e..9ae8c8955db 100644 --- a/include/llvm/Analysis/DataStructure/EquivClassGraphs.h +++ b/include/llvm/Analysis/DataStructure/EquivClassGraphs.h @@ -23,11 +23,9 @@ #include namespace llvm { + class Module; + class Function; -class Module; -class Function; - -namespace PA { /// EquivClassGraphs - This is the same as the complete bottom-up graphs, but /// with functions partitioned into equivalence classes and a single merged /// DS graph for all functions in an equivalence class. After this merging, @@ -106,7 +104,4 @@ namespace PA { DSGraph &getOrCreateGraph(Function &F); }; - -}; // end PA namespace - }; // end llvm namespace diff --git a/lib/Analysis/DataStructure/EquivClassGraphs.cpp b/lib/Analysis/DataStructure/EquivClassGraphs.cpp index af0f434138b..a1054e5baa3 100644 --- a/lib/Analysis/DataStructure/EquivClassGraphs.cpp +++ b/lib/Analysis/DataStructure/EquivClassGraphs.cpp @@ -29,7 +29,7 @@ using namespace llvm; namespace { - RegisterAnalysis X("equivdatastructure", + RegisterAnalysis X("equivdatastructure", "Equivalence-class Bottom-up Data Structure Analysis"); Statistic<> NumEquivBUInlines("equivdatastructures", "Number of graphs inlined"); @@ -58,8 +58,7 @@ static void CheckAllGraphs(Module *M, GT &ECGraphs) { // getSomeCalleeForCallSite - Return any one callee function at a call site. // -Function *PA::EquivClassGraphs:: -getSomeCalleeForCallSite(const CallSite &CS) const { +Function *EquivClassGraphs:: getSomeCalleeForCallSite(const CallSite &CS) const{ Function *thisFunc = CS.getCaller(); assert(thisFunc && "getSomeCalleeForCallSite(): Not a valid call site?"); DSGraph &DSG = getDSGraph(*thisFunc); @@ -72,7 +71,7 @@ getSomeCalleeForCallSite(const CallSite &CS) const { // runOnModule - Calculate the bottom up data structure graphs for each function // in the program. // -bool PA::EquivClassGraphs::runOnModule(Module &M) { +bool EquivClassGraphs::runOnModule(Module &M) { CBU = &getAnalysis(); DEBUG(CheckAllGraphs(&M, *CBU)); @@ -112,7 +111,7 @@ bool PA::EquivClassGraphs::runOnModule(Module &M) { // calls to functions. If a call site can invoke any functions [F1, F2... FN], // unify the N functions together in the FuncECs set. // -void PA::EquivClassGraphs::buildIndirectFunctionSets(Module &M) { +void EquivClassGraphs::buildIndirectFunctionSets(Module &M) { const ActualCalleesTy& AC = CBU->getActualCallees(); // Loop over all of the indirect calls in the program. If a call site can @@ -252,7 +251,7 @@ void PA::EquivClassGraphs::buildIndirectFunctionSets(Module &M) { } -DSGraph &PA::EquivClassGraphs::getOrCreateGraph(Function &F) { +DSGraph &EquivClassGraphs::getOrCreateGraph(Function &F) { // Has the graph already been created? DSGraph *&Graph = DSInfo[&F]; if (Graph) return *Graph; @@ -277,7 +276,7 @@ DSGraph &PA::EquivClassGraphs::getOrCreateGraph(Function &F) { } -unsigned PA::EquivClassGraphs:: +unsigned EquivClassGraphs:: processSCC(DSGraph &FG, std::vector &Stack, unsigned &NextID, std::map &ValMap) { std::map::iterator It = ValMap.lower_bound(&FG); @@ -347,7 +346,7 @@ processSCC(DSGraph &FG, std::vector &Stack, unsigned &NextID, /// processGraph - Process the CBU graphs for the program in bottom-up order on /// the SCC of the __ACTUAL__ call graph. This builds final folded CBU graphs. -void PA::EquivClassGraphs::processGraph(DSGraph &G) { +void EquivClassGraphs::processGraph(DSGraph &G) { DEBUG(std::cerr << " ProcessGraph for function " << G.getFunctionNames() << "\n");