[llvm-commits] CVS: poolalloc/lib/PoolAllocate/EquivClassGraphs.cpp EquivClassGraphs.h
Chris Lattner
lattner at cs.uiuc.edu
Mon Nov 1 13:02:33 PST 2004
Changes in directory poolalloc/lib/PoolAllocate:
EquivClassGraphs.cpp updated: 1.11 -> 1.12
EquivClassGraphs.h updated: 1.9 -> 1.10
---
Log message:
Rename FoldedGraph -> DSInfo to be consistent with other passes
delete some dead methods
---
Diffs of the changes: (+8 -22)
Index: poolalloc/lib/PoolAllocate/EquivClassGraphs.cpp
diff -u poolalloc/lib/PoolAllocate/EquivClassGraphs.cpp:1.11 poolalloc/lib/PoolAllocate/EquivClassGraphs.cpp:1.12
--- poolalloc/lib/PoolAllocate/EquivClassGraphs.cpp:1.11 Mon Nov 1 14:37:00 2004
+++ poolalloc/lib/PoolAllocate/EquivClassGraphs.cpp Mon Nov 1 15:02:23 2004
@@ -210,7 +210,7 @@
for (std::set<Function*>::const_iterator EqI = EqClass.begin(),
EqEnd = EqClass.end(); EqI != EqEnd; ++EqI) {
Function* F = *EqI;
- DSGraph*& FG = FoldedGraphsMap[F];
+ DSGraph*& FG = DSInfo[F];
if (F == LF || FG == mergedG)
continue;
@@ -253,7 +253,7 @@
DSGraph &PA::EquivClassGraphs::getOrCreateGraph(Function &F) {
// Has the graph already been created?
- DSGraph *&Graph = FoldedGraphsMap[&F];
+ DSGraph *&Graph = DSInfo[&F];
if (Graph) return *Graph;
DSGraph &CBUGraph = CBU->getDSGraph(F);
@@ -263,11 +263,11 @@
Graph->setGlobalsGraph(&getGlobalsGraph());
Graph->setPrintAuxCalls();
- // Make sure to update the FoldedGraphsMap map for all functions in the graph!
+ // Make sure to update the DSInfo map for all functions in the graph!
for (DSGraph::ReturnNodesTy::iterator I = Graph->getReturnNodes().begin();
I != Graph->getReturnNodes().end(); ++I)
if (I->first != &F) {
- DSGraph*& FG = FoldedGraphsMap[I->first];
+ DSGraph *&FG = DSInfo[I->first];
assert(FG == NULL || FG == &CBU->getDSGraph(*I->first) &&
"Merging function in SCC twice?");
FG = Graph;
Index: poolalloc/lib/PoolAllocate/EquivClassGraphs.h
diff -u poolalloc/lib/PoolAllocate/EquivClassGraphs.h:1.9 poolalloc/lib/PoolAllocate/EquivClassGraphs.h:1.10
--- poolalloc/lib/PoolAllocate/EquivClassGraphs.h:1.9 Mon Nov 1 14:37:00 2004
+++ poolalloc/lib/PoolAllocate/EquivClassGraphs.h Mon Nov 1 15:02:23 2004
@@ -38,8 +38,8 @@
DSGraph *GlobalsGraph;
- // FoldedGraphsMap, one graph for each function
- hash_map<const Function*, DSGraph*> FoldedGraphsMap;
+ // DSInfo - one graph for each function.
+ hash_map<const Function*, DSGraph*> DSInfo;
/// ActualCallees - The actual functions callable from indirect call sites.
///
@@ -70,9 +70,8 @@
/// callees also have the same folded graph as the CBU graph.
///
DSGraph &getDSGraph(const Function &F) const {
- hash_map<const Function*, DSGraph*>::const_iterator I =
- FoldedGraphsMap.find(const_cast<Function*>(&F));
- assert(I != FoldedGraphsMap.end() && "No folded graph for function!");
+ hash_map<const Function*, DSGraph*>::const_iterator I = DSInfo.find(&F);
+ assert(I != DSInfo.end() && "No graph computed for that function!");
return *I->second;
}
@@ -124,19 +123,6 @@
void processGraph(DSGraph &FG, Function &F);
DSGraph &getOrCreateGraph(Function &F);
-
- bool hasFoldedGraph(const Function& F) const {
- hash_map<const Function*, DSGraph*>::const_iterator I =
- FoldedGraphsMap.find(const_cast<Function*>(&F));
- return (I != FoldedGraphsMap.end());
- }
-
- DSGraph* getOrCreateLeaderGraph(const Function& leader) {
- DSGraph*& leaderGraph = FoldedGraphsMap[&leader];
- if (leaderGraph == NULL)
- leaderGraph = new DSGraph(CBU->getGlobalsGraph().getTargetData());
- return leaderGraph;
- }
};
}; // end PA namespace
More information about the llvm-commits
mailing list