[llvm-commits] CVS: llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp MemoryDepAnalysis.cpp

Chris Lattner lattner at cs.uiuc.edu
Sun Aug 31 15:03:03 PDT 2003


Changes in directory llvm/lib/Analysis/IPA:

CallGraphSCCPass.cpp updated: 1.2 -> 1.3
MemoryDepAnalysis.cpp updated: 1.8 -> 1.9

---
Log message:

Rename TarjanSCCIterator -> scc_iterator
  * Increases consistency with other iterators (e.g. df_iterator, po_iterator...)
  * It's shorter
  * We don't name classes by the implementation, we name it for the interface!


---
Diffs of the changes:

Index: llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp
diff -u llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp:1.2 llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp:1.3
--- llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp:1.2	Sun Aug 31 14:35:16 2003
+++ llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp	Sun Aug 31 15:01:57 2003
@@ -10,7 +10,7 @@
 
 #include "llvm/CallGraphSCCPass.h"
 #include "llvm/Analysis/CallGraph.h"
-#include "Support/TarjanSCCIterator.h"
+#include "Support/SCCIterator.h"
 
 /// getAnalysisUsage - For this class, we declare that we require and preserve
 /// the call graph.  If the derived class implements this method, it should
@@ -23,7 +23,7 @@
 bool CallGraphSCCPass::run(Module &M) {
   CallGraph &CG = getAnalysis<CallGraph>();
   bool Changed = false;
-  for (TarjanSCC_iterator<CallGraph*> I = tarj_begin(&CG), E = tarj_end(&CG);
+  for (scc_iterator<CallGraph*> I = scc_begin(&CG), E = scc_end(&CG);
        I != E; ++I)
     Changed = runOnSCC(*I);
   return Changed;


Index: llvm/lib/Analysis/IPA/MemoryDepAnalysis.cpp
diff -u llvm/lib/Analysis/IPA/MemoryDepAnalysis.cpp:1.8 llvm/lib/Analysis/IPA/MemoryDepAnalysis.cpp:1.9
--- llvm/lib/Analysis/IPA/MemoryDepAnalysis.cpp:1.8	Sun Aug 31 14:54:57 2003
+++ llvm/lib/Analysis/IPA/MemoryDepAnalysis.cpp	Sun Aug 31 15:01:57 2003
@@ -18,7 +18,7 @@
 #include "llvm/iOther.h"
 #include "llvm/Support/InstVisitor.h"
 #include "llvm/Support/CFG.h"
-#include "Support/TarjanSCCIterator.h"
+#include "Support/SCCIterator.h"
 #include "Support/Statistic.h"
 #include "Support/STLExtras.h"
 #include "Support/hash_map"
@@ -208,7 +208,7 @@
 }
 
 
-/// Basic dependence gathering algorithm, using TarjanSCCIterator on CFG:
+/// Basic dependence gathering algorithm, using scc_iterator on CFG:
 /// 
 /// for every SCC S in the CFG in PostOrder on the SCC DAG
 ///     {
@@ -290,7 +290,7 @@
   ModRefInfoBuilder builder(*funcGraph, *funcModRef, ModRefCurrent);
   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.
+    // Note: BBs in the SCC<> created by scc_iterator are in postorder.
     for (BasicBlock::reverse_iterator II=(*BI)->rbegin(), IE=(*BI)->rend();
          II != IE; ++II)
       builder.visit(*II);
@@ -438,8 +438,7 @@
 
   ModRefTable ModRefAfter;
 
-  for (TarjanSCC_iterator<Function*> I = tarj_begin(&F), E = tarj_end(&F);
-       I != E; ++I)
+  for (scc_iterator<Function*> I = scc_begin(&F), E = scc_end(&F); I != E; ++I)
     ProcessSCC(*I, ModRefAfter, I.hasLoop());
 
   return true;





More information about the llvm-commits mailing list