[llvm-commits] CVS: llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp

Chris Lattner lattner at cs.uiuc.edu
Thu Nov 13 12:49:01 PST 2003


Changes in directory llvm/lib/Analysis/DataStructure:

CompleteBottomUp.cpp updated: 1.2 -> 1.3

---
Log message:

Trying to get the dsgraph for an external function is bad for DSA's health


---
Diffs of the changes:  (+12 -11)

Index: llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp
diff -u llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp:1.2 llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp:1.3
--- llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp:1.2	Wed Nov 12 23:05:41 2003
+++ llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp	Thu Nov 13 12:48:11 2003
@@ -116,17 +116,18 @@
 
     // Loop over all of the actually called functions...
     ActualCalleesTy::iterator I, E;
-    for (tie(I, E) = ActualCallees.equal_range(Call); I != E; ++I) {
-      DSGraph &Callee = getOrCreateGraph(*I->second);
-      unsigned M;
-      // Have we visited the destination function yet?
-      hash_map<DSGraph*, unsigned>::iterator It = ValMap.find(&Callee);
-      if (It == ValMap.end())  // No, visit it now.
-        M = calculateSCCGraphs(Callee, Stack, NextID, ValMap);
-      else                    // Yes, get it's number.
-        M = It->second;
-      if (M < Min) Min = M;
-    }
+    for (tie(I, E) = ActualCallees.equal_range(Call); I != E; ++I)
+      if (!I->second->isExternal()) {
+        DSGraph &Callee = getOrCreateGraph(*I->second);
+        unsigned M;
+        // Have we visited the destination function yet?
+        hash_map<DSGraph*, unsigned>::iterator It = ValMap.find(&Callee);
+        if (It == ValMap.end())  // No, visit it now.
+          M = calculateSCCGraphs(Callee, Stack, NextID, ValMap);
+        else                    // Yes, get it's number.
+          M = It->second;
+        if (M < Min) Min = M;
+      }
   }
 
   assert(ValMap[&FG] == MyID && "SCC construction assumption wrong!");





More information about the llvm-commits mailing list