From 68690673adccf534d10a7bb983efe0617e4df0db Mon Sep 17 00:00:00 2001 From: "Vikram S. Adve" Date: Mon, 25 Nov 2002 18:21:25 +0000 Subject: [PATCH] Keep global nodes in each DS Graph (by forcing them to be marked live). llvm-svn: 4831 --- llvm/lib/Analysis/DataStructure/DataStructure.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/llvm/lib/Analysis/DataStructure/DataStructure.cpp b/llvm/lib/Analysis/DataStructure/DataStructure.cpp index 94c1f8537e4d..fe72bfe6d522 100644 --- a/llvm/lib/Analysis/DataStructure/DataStructure.cpp +++ b/llvm/lib/Analysis/DataStructure/DataStructure.cpp @@ -997,10 +997,10 @@ void DSGraph::removeDeadNodes() { // Mark all nodes reachable by (non-global) scalar nodes as alive... for (std::map::iterator I = ScalarMap.begin(), E = ScalarMap.end(); I != E; ++I) - if (!isa(I->first)) // Don't mark globals! + // if (!isa(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);