[llvm-commits] CVS: llvm/lib/Analysis/IPA/MemoryDepAnalysis.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sun Aug 31 14:47:08 PDT 2003
Changes in directory llvm/lib/Analysis/IPA:
MemoryDepAnalysis.cpp updated: 1.5 -> 1.6
---
Log message:
Remove explicit passing of SCC's around as objects.
---
Diffs of the changes:
Index: llvm/lib/Analysis/IPA/MemoryDepAnalysis.cpp
diff -u llvm/lib/Analysis/IPA/MemoryDepAnalysis.cpp:1.5 llvm/lib/Analysis/IPA/MemoryDepAnalysis.cpp:1.6
--- llvm/lib/Analysis/IPA/MemoryDepAnalysis.cpp:1.5 Sun Aug 31 14:40:57 2003
+++ llvm/lib/Analysis/IPA/MemoryDepAnalysis.cpp Sun Aug 31 14:46:46 2003
@@ -271,14 +271,12 @@
/// }
///
///
-void MemoryDepAnalysis::ProcessSCC(SCC<Function*>& S,
- ModRefTable& ModRefAfter) {
+void MemoryDepAnalysis::ProcessSCC(std::vector<BasicBlock*> &S,
+ ModRefTable& ModRefAfter, bool hasLoop) {
ModRefTable ModRefCurrent;
ModRefTable::ModRefMap& mapCurrent = ModRefCurrent.modRefMap;
ModRefTable::ModRefMap& mapAfter = ModRefAfter.modRefMap;
- bool hasLoop = S.HasLoop();
-
// Builder class fills out a ModRefTable one instruction at a time.
// To use it, we just invoke it's visit function for each basic block:
//
@@ -290,7 +288,8 @@
// : Add I to ModRefCurrent.users if it uses any node
//
ModRefInfoBuilder builder(*funcGraph, *funcModRef, ModRefCurrent);
- for (SCC<Function*>::iterator BI=S.begin(), BE=S.end(); BI != BE; ++BI)
+ for (std::vector<BasicBlock*>::iterator BI = S.begin(), BE = S.end();
+ BI != BE; ++BI)
// Note: BBs in the SCC<> created by TarjanSCCIterator are in postorder.
for (BasicBlock::reverse_iterator II=(*BI)->rbegin(), IE=(*BI)->rend();
II != IE; ++II)
@@ -442,7 +441,7 @@
SCC<Function*>* nextSCC;
for (TarjanSCC_iterator<Function*> I = tarj_begin(&F), E = tarj_end(&F);
I != E; ++I)
- ProcessSCC(*I, ModRefAfter);
+ ProcessSCC(*I, ModRefAfter, (*I).HasLoop());
return true;
}
More information about the llvm-commits
mailing list