diff options
author | Chris Lattner <sabre@nondot.org> | 2005-04-02 19:17:18 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-04-02 19:17:18 +0000 |
commit | 021decc82d843c69363d3d6ee1a202613911c61c (patch) | |
tree | 885dc36165581cd92ccdb404d81cba5c19f1ace2 /lib/Analysis/DataStructure/Steensgaard.cpp | |
parent | df968b8b37d93c105ced41bea5d3231ee171a24e (diff) |
Change the ActualCallees callgraph from hash_multimap<Instruction,Function>
to std::set<std::pair<Inst,Func>> to avoid duplicate entries.
This speeds up the CompleteBU pass from 1.99s to .15s on povray and the
eqgraph passes from 1.5s to .16s on the same.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21031 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/DataStructure/Steensgaard.cpp')
-rw-r--r-- | lib/Analysis/DataStructure/Steensgaard.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/Analysis/DataStructure/Steensgaard.cpp b/lib/Analysis/DataStructure/Steensgaard.cpp index 747ae2fc4b..9f0574df1a 100644 --- a/lib/Analysis/DataStructure/Steensgaard.cpp +++ b/lib/Analysis/DataStructure/Steensgaard.cpp @@ -25,11 +25,10 @@ using namespace llvm; namespace { class Steens : public ModulePass, public AliasAnalysis { DSGraph *ResultGraph; - DSGraph *GlobalsGraph; // FIXME: Eliminate globals graph stuff from DNE EquivalenceClasses<GlobalValue*> GlobalECs; // Always empty public: - Steens() : ResultGraph(0), GlobalsGraph(0) {} + Steens() : ResultGraph(0) {} ~Steens() { releaseMyMemory(); assert(ResultGraph == 0 && "releaseMemory not called?"); @@ -116,8 +115,7 @@ bool Steens::runOnModule(Module &M) { // Create a new, empty, graph... ResultGraph = new DSGraph(GlobalECs, getTargetData()); - GlobalsGraph = new DSGraph(GlobalECs, getTargetData()); - ResultGraph->setGlobalsGraph(GlobalsGraph); + ResultGraph->spliceFrom(LDS.getGlobalsGraph()); // Loop over the rest of the module, merging graphs for non-external functions // into this graph. @@ -186,7 +184,7 @@ bool Steens::runOnModule(Module &M) { // Remove any nodes that are dead after all of the merging we have done... // FIXME: We should be able to disable the globals graph for steens! - ResultGraph->removeDeadNodes(DSGraph::KeepUnreachableGlobals); + //ResultGraph->removeDeadNodes(DSGraph::KeepUnreachableGlobals); DEBUG(print(std::cerr, &M)); return false; |