Graph->maskIncompleteMarkers();
Graph->markIncompleteNodes();
+ Graph->removeTriviallyDeadNodes(false);
Graph->removeDeadNodes(/*KeepAllGlobals*/ true, /*KeepCalls*/ true);
DEBUG(std::cerr << " [BU] Done inlining: " << F.getName() << " ["
N->getSize() == 0 &&
N->getReferrers().size() == N->getGlobals().size()) {
- // Remove the globals from the valuemap, so that the referrer count will go
+ // Remove the globals from the ValueMap, so that the referrer count will go
// down to zero.
removeRefsToGlobal(N, ValueMap);
assert(N->getReferrers().empty() && "Referrers should all be gone now!");
//
void DSGraph::removeTriviallyDeadNodes(bool KeepAllGlobals) {
for (unsigned i = 0; i != Nodes.size(); ++i)
- if (! KeepAllGlobals || ! (Nodes[i]->NodeType & DSNode::GlobalNode))
+ if (!KeepAllGlobals || !(Nodes[i]->NodeType & DSNode::GlobalNode))
if (isNodeDead(Nodes[i])) { // This node is dead!
delete Nodes[i]; // Free memory...
Nodes.erase(Nodes.begin()+i--); // Remove from node list...