Fix the Regression/Transforms/DSAnalysis/recursion.ll regression.
authorChris Lattner <sabre@nondot.org>
Fri, 4 Feb 2005 18:58:04 +0000 (18:58 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 4 Feb 2005 18:58:04 +0000 (18:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20031 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/DataStructure/TopDownClosure.cpp

index 85c83a16560f56ed32d176a5e9cecf50554b59b5..bbce45b568d70ffbd0095ea7a902808bbe257fc7 100644 (file)
@@ -241,10 +241,9 @@ void TDDataStructures::inlineGraphIntoCallees(DSGraph &Graph) {
     for (BUDataStructures::ActualCalleesTy::const_iterator I = IP.first;
          I != IP.second; ++I) {
       DSGraph& CalleeGraph = getDSGraph(*I->second);
-      assert(&CalleeGraph != &Graph && "TD need not inline graph into self!");
-
-      CallSites.insert(std::make_pair(&CalleeGraph,
-                                      std::make_pair(I->second, &*CI)));
+      if (&CalleeGraph != &Graph)
+        CallSites.insert(std::make_pair(&CalleeGraph,
+                                        std::make_pair(I->second, &*CI)));
     }
   }