[PM] Add some more logging to make it more clear when the CGSCC
authorChandler Carruth <chandlerc@gmail.com>
Wed, 7 Dec 2016 10:33:15 +0000 (10:33 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Wed, 7 Dec 2016 10:33:15 +0000 (10:33 +0000)
infrastrucutre is skipping SCCs and RefSCCs.

llvm-svn: 288894

llvm/include/llvm/Analysis/CGSCCPassManager.h

index dcff167..fbbbace 100644 (file)
@@ -308,8 +308,11 @@ public:
 
       do {
         LazyCallGraph::RefSCC *RC = RCWorklist.pop_back_val();
-        if (InvalidRefSCCSet.count(RC))
+        if (InvalidRefSCCSet.count(RC)) {
+          if (DebugLogging)
+            dbgs() << "Skipping an invalid RefSCC...\n";
           continue;
+        }
 
         assert(CWorklist.empty() &&
                "Should always start with an empty SCC worklist");
@@ -328,8 +331,17 @@ public:
           // other RefSCCs in the worklist. The invalid ones are dead and the
           // other RefSCCs should be queued above, so we just need to skip both
           // scenarios here.
-          if (InvalidSCCSet.count(C) || &C->getOuterRefSCC() != RC)
+          if (InvalidSCCSet.count(C)) {
+            if (DebugLogging)
+              dbgs() << "Skipping an invalid SCC...\n";
             continue;
+          }
+          if (&C->getOuterRefSCC() != RC) {
+            if (DebugLogging)
+              dbgs() << "Skipping an SCC that is now part of some other "
+                        "RefSCC...\n";
+            continue;
+          }
 
           do {
             // Check that we didn't miss any update scenario.