OSDN Git Service

Add a error message to cbu to match bu
authorAndrew Lenharth <andrewl@lenharth.org>
Fri, 16 Jun 2006 14:43:36 +0000 (14:43 +0000)
committerAndrew Lenharth <andrewl@lenharth.org>
Fri, 16 Jun 2006 14:43:36 +0000 (14:43 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28819 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/DataStructure/CompleteBottomUp.cpp

index 1fc4197..452f033 100644 (file)
@@ -56,8 +56,14 @@ bool CompleteBUDataStructures::runOnModule(Module &M) {
   }
 
   for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
-    if (!I->isExternal() && !DSInfo.count(I))
+    if (!I->isExternal() && !DSInfo.count(I)) {
+#ifndef NDEBUG
+      if (MainFunc)
+        std::cerr << "*** CBU: Function unreachable from main: "
+                  << I->getName() << "\n";
+#endif
       calculateSCCGraphs(getOrCreateGraph(*I), Stack, NextID, ValMap);
+    }
 
   GlobalsGraph->removeTriviallyDeadNodes();