mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-21 21:29:41 +00:00
Keep global nodes in each DS Graph (by forcing them to be marked live).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4831 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8b938664f2
commit
e31267dd9a
@ -997,10 +997,10 @@ void DSGraph::removeDeadNodes() {
|
|||||||
// Mark all nodes reachable by (non-global) scalar nodes as alive...
|
// Mark all nodes reachable by (non-global) scalar nodes as alive...
|
||||||
for (std::map<Value*, DSNodeHandle>::iterator I = ScalarMap.begin(),
|
for (std::map<Value*, DSNodeHandle>::iterator I = ScalarMap.begin(),
|
||||||
E = ScalarMap.end(); I != E; ++I)
|
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);
|
markAlive(I->second.getNode(), Alive);
|
||||||
else // Keep track of global nodes
|
// else // Keep track of global nodes
|
||||||
GlobalNodes.push_back(std::make_pair(I->first, I->second.getNode()));
|
// GlobalNodes.push_back(std::make_pair(I->first, I->second.getNode()));
|
||||||
|
|
||||||
// The return value is alive as well...
|
// The return value is alive as well...
|
||||||
markAlive(RetNode.getNode(), Alive);
|
markAlive(RetNode.getNode(), Alive);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user