Make removeTriviallyDeadNodes a private interface of DSGraph
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4659 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/DataStructure/Local.cpp b/lib/Analysis/DataStructure/Local.cpp
index e731d5c..3df4fd4 100644
--- a/lib/Analysis/DataStructure/Local.cpp
+++ b/lib/Analysis/DataStructure/Local.cpp
@@ -74,9 +74,6 @@
getValueDest(*I);
visit(G.getFunction()); // Single pass over the function
-
- // Not inlining, only eliminate trivially dead nodes.
- G.removeTriviallyDeadNodes();
}
private:
@@ -135,6 +132,9 @@
// Use the graph builder to construct the local version of the graph
GraphBuilder B(*this, Nodes, RetNode, ScalarMap, FunctionCalls);
markIncompleteNodes();
+
+ // Remove any nodes made dead due to merging...
+ removeDeadNodes(true, true);
}