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

Chris Lattner lattner at cs.uiuc.edu
Wed Jul 2 18:58:24 PDT 2003


Changes in directory llvm/lib/Analysis/DataStructure:

DataStructure.cpp updated: 1.112 -> 1.113

---
Log message:

INCLUDE_PARENT_GRAPH is required!


---
Diffs of the changes:

Index: llvm/lib/Analysis/DataStructure/DataStructure.cpp
diff -u llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.112 llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.113
--- llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.112	Tue Jul  1 23:38:49 2003
+++ llvm/lib/Analysis/DataStructure/DataStructure.cpp	Wed Jul  2 18:57:05 2003
@@ -51,11 +51,7 @@
 //===----------------------------------------------------------------------===//
 
 DSNode::DSNode(const Type *T, DSGraph *G)
-  : NumReferrers(0), Size(0),
-#ifdef INCLUDE_PARENT_GRAPH
-    ParentGraph(G), 
-#endif
-    Ty(Type::VoidTy), NodeType(0) {
+  : NumReferrers(0), Size(0), ParentGraph(G), Ty(Type::VoidTy), NodeType(0) {
   // Add the type entry if it is specified...
   if (T) mergeTypeInfo(T, 0);
   G->getNodes().push_back(this);
@@ -63,10 +59,7 @@
 
 // DSNode copy constructor... do not copy over the referrers list!
 DSNode::DSNode(const DSNode &N, DSGraph *G)
-  : NumReferrers(0), Size(N.Size),
-#ifdef INCLUDE_PARENT_GRAPH
-    ParentGraph(G),
-#endif
+  : NumReferrers(0), Size(N.Size), ParentGraph(G),
     Ty(N.Ty), Links(N.Links), Globals(N.Globals), NodeType(N.NodeType) {
   G->getNodes().push_back(this);
 }
@@ -120,13 +113,7 @@
   ++NumFolds;
 
   // Create the node we are going to forward to...
-  DSNode *DestNode = new DSNode(0,
-#ifdef INCLUDE_PARENT_GRAPH
-                                ParentGraph
-#else
-                                0
-#endif
-                                );
+  DSNode *DestNode = new DSNode(0, ParentGraph);
   DestNode->NodeType = NodeType|DSNode::Array;
   DestNode->Ty = Type::VoidTy;
   DestNode->Size = 1;
@@ -489,10 +476,8 @@
   }
 
   Module *M = 0;
-#ifdef INCLUDE_PARENT_GRAPH
   if (getParentGraph()->getReturnNodes().size())
     M = getParentGraph()->getReturnNodes().begin()->first->getParent();
-#endif
   DEBUG(std::cerr << "MergeTypeInfo Folding OrigTy: ";
         WriteTypeSymbolic(std::cerr, Ty, M) << "\n due to:";
         WriteTypeSymbolic(std::cerr, NewTy, M) << " @ " << Offset << "!\n"
@@ -1268,7 +1253,7 @@
   std::vector<unsigned char> AuxFCallsAlive(AuxFunctionCalls.size());
   do {
     Visited.clear();
-    // If any global nodes points to a non-global that is "alive", the global is
+    // If any global node points to a non-global that is "alive", the global is
     // "alive" as well...  Remove it from the GlobalNodes list so we only have
     // unreachable globals in the list.
     //
@@ -1319,9 +1304,7 @@
       if (!(Flags & DSGraph::RemoveUnreachableGlobals) &&  // Not in TD pass
           Visited.count(N)) {                    // Visited but not alive?
         GlobalsGraph->Nodes.push_back(N);        // Move node to globals graph
-#ifdef INCLUDE_PARENT_GRAPH
         N->setParentGraph(GlobalsGraph);
-#endif
       } else {                                 // Otherwise, delete the node
         assert((!N->isGlobalNode() ||
                 (Flags & DSGraph::RemoveUnreachableGlobals))





More information about the llvm-commits mailing list