The tarjan iterator now returns a reference to the current SCC, not a possibly null...
authorChris Lattner <sabre@nondot.org>
Sun, 31 Aug 2003 19:35:16 +0000 (19:35 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 31 Aug 2003 19:35:16 +0000 (19:35 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8262 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/DataStructure/MemoryDepAnalysis.cpp
lib/Analysis/IPA/CallGraphSCCPass.cpp
lib/Analysis/IPA/MemoryDepAnalysis.cpp
lib/Analysis/IPA/PrintSCC.cpp
lib/Analysis/PrintSCC.cpp
tools/analyze/PrintSCC.cpp
tools/opt/PrintSCC.cpp

index a185c891197c4db846c07470400824fb82aeaf26..417b4be0eec2f185f3e6568da1ca864407d2079f 100644 (file)
@@ -432,7 +432,7 @@ bool MemoryDepAnalysis::runOnFunction(Function &F) {
   SCC<Function*>* nextSCC;
   for (TarjanSCC_iterator<Function*> I = tarj_begin(&F), E = tarj_end(&F);
        I != E; ++I)
-    ProcessSCC(**I, ModRefAfter);
+    ProcessSCC(*I, ModRefAfter);
 
   return true;
 }
index fd5e1ca80efea69b4fd52073e0009067fa04919a..031fb02d00225518481c15230d75d9100ad356a6 100644 (file)
@@ -25,6 +25,6 @@ bool CallGraphSCCPass::run(Module &M) {
   bool Changed = false;
   for (TarjanSCC_iterator<CallGraph*> I = tarj_begin(&CG), E = tarj_end(&CG);
        I != E; ++I)
-    Changed = runOnSCC(**I);
+    Changed = runOnSCC(*I);
   return Changed;
 }
index a185c891197c4db846c07470400824fb82aeaf26..417b4be0eec2f185f3e6568da1ca864407d2079f 100644 (file)
@@ -432,7 +432,7 @@ bool MemoryDepAnalysis::runOnFunction(Function &F) {
   SCC<Function*>* nextSCC;
   for (TarjanSCC_iterator<Function*> I = tarj_begin(&F), E = tarj_end(&F);
        I != E; ++I)
-    ProcessSCC(**I, ModRefAfter);
+    ProcessSCC(*I, ModRefAfter);
 
   return true;
 }
index 83dd16dcf3b5d20ae14c08b3a9e57f3ae2ae2aed..7affce61317fddb1088246f752b7e01ff3fb0f74 100644 (file)
@@ -59,7 +59,7 @@ bool CFGSCC::runOnFunction(Function &F) {
   std::cout << "SCCs for Function " << F.getName() << " in PostOrder:";
   for (TarjanSCC_iterator<Function*> I = tarj_begin(&F),
          E = tarj_end(&F); I != E; ++I) {
-    SCC<Function*> &nextSCC = **I;
+    SCC<Function*> &nextSCC = *I;
     std::cout << "\nSCC #" << ++sccNum << " : ";
     for (SCC<Function*>::const_iterator I = nextSCC.begin(),
            E = nextSCC.end(); I != E; ++I)
@@ -80,7 +80,7 @@ bool CallGraphSCC::run(Module &M) {
   std::cout << "SCCs for the program in PostOrder:";
   for (TarjanSCC_iterator<CallGraphNode*> SCCI = tarj_begin(rootNode),
          E = tarj_end(rootNode); SCCI != E; ++SCCI) {
-    const SCC<CallGraphNode*> &nextSCC = **SCCI;
+    const SCC<CallGraphNode*> &nextSCC = *SCCI;
     std::cout << "\nSCC #" << ++sccNum << " : ";
     for (SCC<CallGraphNode*>::const_iterator I = nextSCC.begin(),
            E = nextSCC.end(); I != E; ++I)
index 83dd16dcf3b5d20ae14c08b3a9e57f3ae2ae2aed..7affce61317fddb1088246f752b7e01ff3fb0f74 100644 (file)
@@ -59,7 +59,7 @@ bool CFGSCC::runOnFunction(Function &F) {
   std::cout << "SCCs for Function " << F.getName() << " in PostOrder:";
   for (TarjanSCC_iterator<Function*> I = tarj_begin(&F),
          E = tarj_end(&F); I != E; ++I) {
-    SCC<Function*> &nextSCC = **I;
+    SCC<Function*> &nextSCC = *I;
     std::cout << "\nSCC #" << ++sccNum << " : ";
     for (SCC<Function*>::const_iterator I = nextSCC.begin(),
            E = nextSCC.end(); I != E; ++I)
@@ -80,7 +80,7 @@ bool CallGraphSCC::run(Module &M) {
   std::cout << "SCCs for the program in PostOrder:";
   for (TarjanSCC_iterator<CallGraphNode*> SCCI = tarj_begin(rootNode),
          E = tarj_end(rootNode); SCCI != E; ++SCCI) {
-    const SCC<CallGraphNode*> &nextSCC = **SCCI;
+    const SCC<CallGraphNode*> &nextSCC = *SCCI;
     std::cout << "\nSCC #" << ++sccNum << " : ";
     for (SCC<CallGraphNode*>::const_iterator I = nextSCC.begin(),
            E = nextSCC.end(); I != E; ++I)
index 83dd16dcf3b5d20ae14c08b3a9e57f3ae2ae2aed..7affce61317fddb1088246f752b7e01ff3fb0f74 100644 (file)
@@ -59,7 +59,7 @@ bool CFGSCC::runOnFunction(Function &F) {
   std::cout << "SCCs for Function " << F.getName() << " in PostOrder:";
   for (TarjanSCC_iterator<Function*> I = tarj_begin(&F),
          E = tarj_end(&F); I != E; ++I) {
-    SCC<Function*> &nextSCC = **I;
+    SCC<Function*> &nextSCC = *I;
     std::cout << "\nSCC #" << ++sccNum << " : ";
     for (SCC<Function*>::const_iterator I = nextSCC.begin(),
            E = nextSCC.end(); I != E; ++I)
@@ -80,7 +80,7 @@ bool CallGraphSCC::run(Module &M) {
   std::cout << "SCCs for the program in PostOrder:";
   for (TarjanSCC_iterator<CallGraphNode*> SCCI = tarj_begin(rootNode),
          E = tarj_end(rootNode); SCCI != E; ++SCCI) {
-    const SCC<CallGraphNode*> &nextSCC = **SCCI;
+    const SCC<CallGraphNode*> &nextSCC = *SCCI;
     std::cout << "\nSCC #" << ++sccNum << " : ";
     for (SCC<CallGraphNode*>::const_iterator I = nextSCC.begin(),
            E = nextSCC.end(); I != E; ++I)
index 83dd16dcf3b5d20ae14c08b3a9e57f3ae2ae2aed..7affce61317fddb1088246f752b7e01ff3fb0f74 100644 (file)
@@ -59,7 +59,7 @@ bool CFGSCC::runOnFunction(Function &F) {
   std::cout << "SCCs for Function " << F.getName() << " in PostOrder:";
   for (TarjanSCC_iterator<Function*> I = tarj_begin(&F),
          E = tarj_end(&F); I != E; ++I) {
-    SCC<Function*> &nextSCC = **I;
+    SCC<Function*> &nextSCC = *I;
     std::cout << "\nSCC #" << ++sccNum << " : ";
     for (SCC<Function*>::const_iterator I = nextSCC.begin(),
            E = nextSCC.end(); I != E; ++I)
@@ -80,7 +80,7 @@ bool CallGraphSCC::run(Module &M) {
   std::cout << "SCCs for the program in PostOrder:";
   for (TarjanSCC_iterator<CallGraphNode*> SCCI = tarj_begin(rootNode),
          E = tarj_end(rootNode); SCCI != E; ++SCCI) {
-    const SCC<CallGraphNode*> &nextSCC = **SCCI;
+    const SCC<CallGraphNode*> &nextSCC = *SCCI;
     std::cout << "\nSCC #" << ++sccNum << " : ";
     for (SCC<CallGraphNode*>::const_iterator I = nextSCC.begin(),
            E = nextSCC.end(); I != E; ++I)