The SCC::HasLoop method is now in the main iterator
authorChris Lattner <sabre@nondot.org>
Sun, 31 Aug 2003 19:51:38 +0000 (19:51 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 31 Aug 2003 19:51:38 +0000 (19:51 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8269 91177308-0d34-0410-b5e6-96231b3b80d8

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

index 215b4e2ba7140cca776a77c386082fa290d33c7d..d59b0f7ea86ac542ab108ce2dffe2c0ecec5b9d8 100644 (file)
@@ -441,7 +441,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, (*I).HasLoop());
+    ProcessSCC(*I, ModRefAfter, I.hasLoop());
 
   return true;
 }
index 215b4e2ba7140cca776a77c386082fa290d33c7d..d59b0f7ea86ac542ab108ce2dffe2c0ecec5b9d8 100644 (file)
@@ -441,7 +441,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, (*I).HasLoop());
+    ProcessSCC(*I, ModRefAfter, I.hasLoop());
 
   return true;
 }
index 7affce61317fddb1088246f752b7e01ff3fb0f74..80f699597db397c138a4b6a78470cd94a55d68a3 100644 (file)
@@ -57,14 +57,14 @@ namespace {
 bool CFGSCC::runOnFunction(Function &F) {
   unsigned sccNum = 0;
   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;
+  for (TarjanSCC_iterator<Function*> SCCI = tarj_begin(&F),
+         E = tarj_end(&F); SCCI != E; ++SCCI) {
+    SCC<Function*> &nextSCC = *SCCI;
     std::cout << "\nSCC #" << ++sccNum << " : ";
-    for (SCC<Function*>::const_iterator I = nextSCC.begin(),
+    for (std::vector<BasicBlock*>::const_iterator I = nextSCC.begin(),
            E = nextSCC.end(); I != E; ++I)
       std::cout << (*I)->getName() << ", ";
-    if (nextSCC.size() == 1 && nextSCC.HasLoop())
+    if (nextSCC.size() == 1 && SCCI.hasLoop())
       std::cout << " (Has self-loop).";
   }
   std::cout << "\n";
@@ -82,11 +82,11 @@ bool CallGraphSCC::run(Module &M) {
          E = tarj_end(rootNode); SCCI != E; ++SCCI) {
     const SCC<CallGraphNode*> &nextSCC = *SCCI;
     std::cout << "\nSCC #" << ++sccNum << " : ";
-    for (SCC<CallGraphNode*>::const_iterator I = nextSCC.begin(),
+    for (std::vector<CallGraphNode*>::const_iterator I = nextSCC.begin(),
            E = nextSCC.end(); I != E; ++I)
       std::cout << ((*I)->getFunction() ? (*I)->getFunction()->getName()
                     : std::string("Indirect CallGraph node")) << ", ";
-    if (nextSCC.size() == 1 && nextSCC.HasLoop())
+    if (nextSCC.size() == 1 && SCCI.hasLoop())
       std::cout << " (Has self-loop).";
   }
   std::cout << "\n";
index 7affce61317fddb1088246f752b7e01ff3fb0f74..80f699597db397c138a4b6a78470cd94a55d68a3 100644 (file)
@@ -57,14 +57,14 @@ namespace {
 bool CFGSCC::runOnFunction(Function &F) {
   unsigned sccNum = 0;
   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;
+  for (TarjanSCC_iterator<Function*> SCCI = tarj_begin(&F),
+         E = tarj_end(&F); SCCI != E; ++SCCI) {
+    SCC<Function*> &nextSCC = *SCCI;
     std::cout << "\nSCC #" << ++sccNum << " : ";
-    for (SCC<Function*>::const_iterator I = nextSCC.begin(),
+    for (std::vector<BasicBlock*>::const_iterator I = nextSCC.begin(),
            E = nextSCC.end(); I != E; ++I)
       std::cout << (*I)->getName() << ", ";
-    if (nextSCC.size() == 1 && nextSCC.HasLoop())
+    if (nextSCC.size() == 1 && SCCI.hasLoop())
       std::cout << " (Has self-loop).";
   }
   std::cout << "\n";
@@ -82,11 +82,11 @@ bool CallGraphSCC::run(Module &M) {
          E = tarj_end(rootNode); SCCI != E; ++SCCI) {
     const SCC<CallGraphNode*> &nextSCC = *SCCI;
     std::cout << "\nSCC #" << ++sccNum << " : ";
-    for (SCC<CallGraphNode*>::const_iterator I = nextSCC.begin(),
+    for (std::vector<CallGraphNode*>::const_iterator I = nextSCC.begin(),
            E = nextSCC.end(); I != E; ++I)
       std::cout << ((*I)->getFunction() ? (*I)->getFunction()->getName()
                     : std::string("Indirect CallGraph node")) << ", ";
-    if (nextSCC.size() == 1 && nextSCC.HasLoop())
+    if (nextSCC.size() == 1 && SCCI.hasLoop())
       std::cout << " (Has self-loop).";
   }
   std::cout << "\n";
index 7affce61317fddb1088246f752b7e01ff3fb0f74..80f699597db397c138a4b6a78470cd94a55d68a3 100644 (file)
@@ -57,14 +57,14 @@ namespace {
 bool CFGSCC::runOnFunction(Function &F) {
   unsigned sccNum = 0;
   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;
+  for (TarjanSCC_iterator<Function*> SCCI = tarj_begin(&F),
+         E = tarj_end(&F); SCCI != E; ++SCCI) {
+    SCC<Function*> &nextSCC = *SCCI;
     std::cout << "\nSCC #" << ++sccNum << " : ";
-    for (SCC<Function*>::const_iterator I = nextSCC.begin(),
+    for (std::vector<BasicBlock*>::const_iterator I = nextSCC.begin(),
            E = nextSCC.end(); I != E; ++I)
       std::cout << (*I)->getName() << ", ";
-    if (nextSCC.size() == 1 && nextSCC.HasLoop())
+    if (nextSCC.size() == 1 && SCCI.hasLoop())
       std::cout << " (Has self-loop).";
   }
   std::cout << "\n";
@@ -82,11 +82,11 @@ bool CallGraphSCC::run(Module &M) {
          E = tarj_end(rootNode); SCCI != E; ++SCCI) {
     const SCC<CallGraphNode*> &nextSCC = *SCCI;
     std::cout << "\nSCC #" << ++sccNum << " : ";
-    for (SCC<CallGraphNode*>::const_iterator I = nextSCC.begin(),
+    for (std::vector<CallGraphNode*>::const_iterator I = nextSCC.begin(),
            E = nextSCC.end(); I != E; ++I)
       std::cout << ((*I)->getFunction() ? (*I)->getFunction()->getName()
                     : std::string("Indirect CallGraph node")) << ", ";
-    if (nextSCC.size() == 1 && nextSCC.HasLoop())
+    if (nextSCC.size() == 1 && SCCI.hasLoop())
       std::cout << " (Has self-loop).";
   }
   std::cout << "\n";
index 7affce61317fddb1088246f752b7e01ff3fb0f74..80f699597db397c138a4b6a78470cd94a55d68a3 100644 (file)
@@ -57,14 +57,14 @@ namespace {
 bool CFGSCC::runOnFunction(Function &F) {
   unsigned sccNum = 0;
   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;
+  for (TarjanSCC_iterator<Function*> SCCI = tarj_begin(&F),
+         E = tarj_end(&F); SCCI != E; ++SCCI) {
+    SCC<Function*> &nextSCC = *SCCI;
     std::cout << "\nSCC #" << ++sccNum << " : ";
-    for (SCC<Function*>::const_iterator I = nextSCC.begin(),
+    for (std::vector<BasicBlock*>::const_iterator I = nextSCC.begin(),
            E = nextSCC.end(); I != E; ++I)
       std::cout << (*I)->getName() << ", ";
-    if (nextSCC.size() == 1 && nextSCC.HasLoop())
+    if (nextSCC.size() == 1 && SCCI.hasLoop())
       std::cout << " (Has self-loop).";
   }
   std::cout << "\n";
@@ -82,11 +82,11 @@ bool CallGraphSCC::run(Module &M) {
          E = tarj_end(rootNode); SCCI != E; ++SCCI) {
     const SCC<CallGraphNode*> &nextSCC = *SCCI;
     std::cout << "\nSCC #" << ++sccNum << " : ";
-    for (SCC<CallGraphNode*>::const_iterator I = nextSCC.begin(),
+    for (std::vector<CallGraphNode*>::const_iterator I = nextSCC.begin(),
            E = nextSCC.end(); I != E; ++I)
       std::cout << ((*I)->getFunction() ? (*I)->getFunction()->getName()
                     : std::string("Indirect CallGraph node")) << ", ";
-    if (nextSCC.size() == 1 && nextSCC.HasLoop())
+    if (nextSCC.size() == 1 && SCCI.hasLoop())
       std::cout << " (Has self-loop).";
   }
   std::cout << "\n";