Keep global nodes in each DS Graph (by forcing them to be marked live).
authorVikram S. Adve <vadve@cs.uiuc.edu>
Mon, 25 Nov 2002 18:21:25 +0000 (18:21 +0000)
committerVikram S. Adve <vadve@cs.uiuc.edu>
Mon, 25 Nov 2002 18:21:25 +0000 (18:21 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4831 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/DataStructure/DataStructure.cpp

index 94c1f8537e4d3d01f36bbe347bdcd3c682a461bf..fe72bfe6d522ef787373b647a282e44f9c5b2dc7 100644 (file)
@@ -997,10 +997,10 @@ void DSGraph::removeDeadNodes() {
   // Mark all nodes reachable by (non-global) scalar nodes as alive...
   for (std::map<Value*, DSNodeHandle>::iterator I = ScalarMap.begin(),
          E = ScalarMap.end(); I != E; ++I)
-    if (!isa<GlobalValue>(I->first))              // Don't mark globals!
+    // if (!isa<GlobalValue>(I->first))              // Don't mark globals!
       markAlive(I->second.getNode(), Alive);
-    else                    // Keep track of global nodes
-      GlobalNodes.push_back(std::make_pair(I->first, I->second.getNode()));
+    // else                    // Keep track of global nodes
+    //   GlobalNodes.push_back(std::make_pair(I->first, I->second.getNode()));
 
   // The return value is alive as well...
   markAlive(RetNode.getNode(), Alive);