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

Chris Lattner lattner at cs.uiuc.edu
Sun Nov 10 21:38:01 PST 2002


Changes in directory llvm/lib/Analysis/DataStructure:

DataStructure.cpp updated: 1.64 -> 1.65

---
Log message:

Mark stuff reachable by _AUX_ calls as incomplete in the BU graph


---
Diffs of the changes:

Index: llvm/lib/Analysis/DataStructure/DataStructure.cpp
diff -u llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.64 llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.65
--- llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.64	Sun Nov 10 18:00:46 2002
+++ llvm/lib/Analysis/DataStructure/DataStructure.cpp	Sun Nov 10 21:36:55 2002
@@ -716,6 +716,14 @@
       markIncompleteNode(DSN);
 }
 
+static void markIncomplete(DSCallSite &Call) {
+  // Then the return value is certainly incomplete!
+  markIncompleteNode(Call.getRetVal().getNode());
+
+  // All objects pointed to by function arguments are incomplete!
+  for (unsigned i = 0, e = Call.getNumPtrArgs(); i != e; ++i)
+    markIncompleteNode(Call.getPtrArg(i).getNode());
+}
 
 // markIncompleteNodes - Traverse the graph, identifying nodes that may be
 // modified by other functions that have not been resolved yet.  This marks
@@ -735,15 +743,13 @@
         markIncompleteNode(ScalarMap[I].getNode());
 
   // Mark stuff passed into functions calls as being incomplete...
-  for (unsigned i = 0, e = FunctionCalls.size(); i != e; ++i) {
-    DSCallSite &Call = FunctionCalls[i];
-    // Then the return value is certainly incomplete!
-    markIncompleteNode(Call.getRetVal().getNode());
-
-    // All objects pointed to by function arguments are incomplete!
-    for (unsigned i = 0, e = Call.getNumPtrArgs(); i != e; ++i)
-      markIncompleteNode(Call.getPtrArg(i).getNode());
-  }
+  if (!shouldPrintAuxCalls())
+    for (unsigned i = 0, e = FunctionCalls.size(); i != e; ++i)
+      markIncomplete(FunctionCalls[i]);
+  else
+    for (unsigned i = 0, e = AuxFunctionCalls.size(); i != e; ++i)
+      markIncomplete(AuxFunctionCalls[i]);
+    
 
   // Mark all of the nodes pointed to by global nodes as incomplete...
   for (unsigned i = 0, e = Nodes.size(); i != e; ++i)





More information about the llvm-commits mailing list