[llvm-commits] [poolalloc] r120535 - in /poolalloc/trunk/lib/DSA: BottomUpClosure.cpp CompleteBottomUp.cpp DSGraph.cpp
Arushi Aggarwal
aggarwa4 at illinois.edu
Tue Nov 30 18:41:54 PST 2010
Author: aggarwa4
Date: Tue Nov 30 20:41:54 2010
New Revision: 120535
URL: http://llvm.org/viewvc/llvm-project?rev=120535&view=rev
Log:
BottomUpClosure - remove redundant code
CompleteBottomUp - formatting change
DSGraph - simplified the cloning to globals graph.
Modified:
poolalloc/trunk/lib/DSA/BottomUpClosure.cpp
poolalloc/trunk/lib/DSA/CompleteBottomUp.cpp
poolalloc/trunk/lib/DSA/DSGraph.cpp
Modified: poolalloc/trunk/lib/DSA/BottomUpClosure.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/BottomUpClosure.cpp?rev=120535&r1=120534&r2=120535&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/BottomUpClosure.cpp (original)
+++ poolalloc/trunk/lib/DSA/BottomUpClosure.cpp Tue Nov 30 20:41:54 2010
@@ -29,7 +29,6 @@
STATISTIC (MaxSCC, "Maximum SCC Size in Call Graph");
STATISTIC (NumInlines, "Number of graphs inlined");
STATISTIC (NumCallEdges, "Number of 'actual' call edges");
- STATISTIC (NumSCCMerges, "Number of SCC merges");
STATISTIC (NumIndResolved, "Number of resolved IndCalls");
STATISTIC (NumIndUnresolved, "Number of unresolved IndCalls");
STATISTIC (NumEmptyCalls, "Number of calls we know nothing about");
@@ -140,49 +139,6 @@
}
//
-// Method: mergeSCCs()
-//
-// Description:
-// Create a single DSGraph for every Strongly Connected Component (SCC) in the
-// callgraph. This is done by merging the DSGraphs of every function within
-// each SCC.
-//
-void BUDataStructures::mergeSCCs() {
-
- for (DSCallGraph::flat_key_iterator ii = callgraph.flat_key_begin(),
- ee = callgraph.flat_key_end(); ii != ee; ++ii) {
- //
- // External functions form their own singleton SCC.
- //
- if ((*ii)->isDeclaration()) continue;
-
- DSGraph* SCCGraph = getOrCreateGraph(*ii);
- unsigned SCCSize = 1;
- callgraph.assertSCCRoot(*ii);
-
- for (DSCallGraph::scc_iterator Fi = callgraph.scc_begin(*ii),
- Fe = callgraph.scc_end(*ii); Fi != Fe; ++Fi) {
- const Function* F = *Fi;
- if (F->isDeclaration()) continue;
- if (F == *ii) continue;
- ++SCCSize;
- DSGraph* NFG = getOrCreateGraph(F);
- if (NFG != SCCGraph) {
- ++NumSCCMerges;
- // Update the Function -> DSG map.
- for (DSGraph::retnodes_iterator I = NFG->retnodes_begin(),
- E = NFG->retnodes_end(); I != E; ++I)
- setDSGraph(*I->first, SCCGraph);
-
- SCCGraph->spliceFrom(NFG);
- delete NFG;
- }
- }
- if (MaxSCC < SCCSize) MaxSCC = SCCSize;
- }
-}
-
-//
// Function: applyCallsiteFilter
//
// Description:
Modified: poolalloc/trunk/lib/DSA/CompleteBottomUp.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/CompleteBottomUp.cpp?rev=120535&r1=120534&r2=120535&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/CompleteBottomUp.cpp (original)
+++ poolalloc/trunk/lib/DSA/CompleteBottomUp.cpp Tue Nov 30 20:41:54 2010
@@ -57,9 +57,6 @@
buildIndirectFunctionSets();
formGlobalECs();
-
-
-
for (Module::iterator F = M.begin(); F != M.end(); ++F) {
if (!(F->isDeclaration())) {
if (DSGraph * Graph = getOrCreateGraph(F)) {
Modified: poolalloc/trunk/lib/DSA/DSGraph.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/DSGraph.cpp?rev=120535&r1=120534&r2=120535&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/DSGraph.cpp (original)
+++ poolalloc/trunk/lib/DSA/DSGraph.cpp Tue Nov 30 20:41:54 2010
@@ -1141,11 +1141,6 @@
// Make sure that all globals are cloned over as roots.
if (!(Flags & DSGraph::RemoveUnreachableGlobals) && GlobalsGraph) {
- DSGraph::ScalarMapTy::iterator SMI =
- GlobalsGraph->getScalarMap().find(I->first);
- if (SMI != GlobalsGraph->getScalarMap().end())
- GGCloner.merge(SMI->second, I->second);
- else
GGCloner.getClonedNH(I->second);
}
} else {
More information about the llvm-commits
mailing list