1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00

Fix a bug where we would delete neccesary calls in bu pass

llvm-svn: 5465
This commit is contained in:
Chris Lattner 2003-02-01 06:54:31 +00:00
parent d946a6a307
commit acc67b5d1d

View File

@ -1058,7 +1058,8 @@ void DSGraph::removeDeadNodes(unsigned Flags) {
std::vector<bool> AuxFCallsAlive(AuxFunctionCalls.size());
for (unsigned i = 0, e = AuxFunctionCalls.size(); i != e; ++i)
if (CallSiteUsesAliveArgs(AuxFunctionCalls[i], Alive, Visited)) {
if (!(Flags & DSGraph::RemoveUnreachableGlobals) ||
CallSiteUsesAliveArgs(AuxFunctionCalls[i], Alive, Visited)) {
AuxFunctionCalls[i].markReachableNodes(Alive);
AuxFCallsAlive[i] = true;
}