diff options
author | Chris Lattner <sabre@nondot.org> | 2002-11-09 20:55:04 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-11-09 20:55:04 +0000 |
commit | 3ce235a161b8738ea3bf781c2306cf6540a59269 (patch) | |
tree | 419f441e918f09621bc8d1e901032d04b594d7c7 | |
parent | 2cfbaaf3b9582136abae6cde488f447f6a44ca11 (diff) |
Make removeTriviallyDeadNodes a private interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4658 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/Analysis/DSGraph.h | 26 | ||||
-rw-r--r-- | include/llvm/Analysis/DataStructure/DSGraph.h | 26 |
2 files changed, 16 insertions, 36 deletions
diff --git a/include/llvm/Analysis/DSGraph.h b/include/llvm/Analysis/DSGraph.h index 6afce63e1b..ad175ec063 100644 --- a/include/llvm/Analysis/DSGraph.h +++ b/include/llvm/Analysis/DSGraph.h @@ -126,19 +126,13 @@ public: // void markIncompleteNodes(bool markFormalArgs = true); - // removeTriviallyDeadNodes - After the graph has been constructed, this - // method removes all unreachable nodes that are created because they got - // merged with other nodes in the graph. - // - void removeTriviallyDeadNodes(bool KeepAllGlobals = false); - // removeDeadNodes - Use a more powerful reachability analysis to eliminate // subgraphs that are unreachable. This often occurs because the data // structure doesn't "escape" into it's caller, and thus should be eliminated // from the caller's graph entirely. This is only appropriate to use when // inlining graphs. // - void removeDeadNodes(bool KeepAllGlobals = false, bool KeepCalls = true); + void removeDeadNodes(bool KeepAllGlobals, bool KeepCalls); // CloneFlags enum - Bits that may be passed into the cloneInto method to // specify how to clone the function graph. @@ -167,19 +161,15 @@ public: /// void mergeInGraph(DSCallSite &CS, const DSGraph &Graph, unsigned CloneFlags); -#if 0 - // cloneGlobalInto - Clone the given global node (or the node for the given - // GlobalValue) from the GlobalsGraph and all its target links (recursively). - // - DSNode* cloneGlobalInto(const DSNode* GNode); - DSNode* cloneGlobalInto(GlobalValue* GV) { - assert(!GV || (((DSGraph*) GlobalsGraph)->ScalarMap[GV] != 0)); - return GV? cloneGlobalInto(((DSGraph*) GlobalsGraph)->ScalarMap[GV]) : 0; - } -#endif - private: bool isNodeDead(DSNode *N); + + // removeTriviallyDeadNodes - After the graph has been constructed, this + // method removes all unreachable nodes that are created because they got + // merged with other nodes in the graph. This is used as the first step of + // removeDeadNodes. + // + void removeTriviallyDeadNodes(bool KeepAllGlobals = false); }; #endif diff --git a/include/llvm/Analysis/DataStructure/DSGraph.h b/include/llvm/Analysis/DataStructure/DSGraph.h index 6afce63e1b..ad175ec063 100644 --- a/include/llvm/Analysis/DataStructure/DSGraph.h +++ b/include/llvm/Analysis/DataStructure/DSGraph.h @@ -126,19 +126,13 @@ public: // void markIncompleteNodes(bool markFormalArgs = true); - // removeTriviallyDeadNodes - After the graph has been constructed, this - // method removes all unreachable nodes that are created because they got - // merged with other nodes in the graph. - // - void removeTriviallyDeadNodes(bool KeepAllGlobals = false); - // removeDeadNodes - Use a more powerful reachability analysis to eliminate // subgraphs that are unreachable. This often occurs because the data // structure doesn't "escape" into it's caller, and thus should be eliminated // from the caller's graph entirely. This is only appropriate to use when // inlining graphs. // - void removeDeadNodes(bool KeepAllGlobals = false, bool KeepCalls = true); + void removeDeadNodes(bool KeepAllGlobals, bool KeepCalls); // CloneFlags enum - Bits that may be passed into the cloneInto method to // specify how to clone the function graph. @@ -167,19 +161,15 @@ public: /// void mergeInGraph(DSCallSite &CS, const DSGraph &Graph, unsigned CloneFlags); -#if 0 - // cloneGlobalInto - Clone the given global node (or the node for the given - // GlobalValue) from the GlobalsGraph and all its target links (recursively). - // - DSNode* cloneGlobalInto(const DSNode* GNode); - DSNode* cloneGlobalInto(GlobalValue* GV) { - assert(!GV || (((DSGraph*) GlobalsGraph)->ScalarMap[GV] != 0)); - return GV? cloneGlobalInto(((DSGraph*) GlobalsGraph)->ScalarMap[GV]) : 0; - } -#endif - private: bool isNodeDead(DSNode *N); + + // removeTriviallyDeadNodes - After the graph has been constructed, this + // method removes all unreachable nodes that are created because they got + // merged with other nodes in the graph. This is used as the first step of + // removeDeadNodes. + // + void removeTriviallyDeadNodes(bool KeepAllGlobals = false); }; #endif |