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
diff --git a/lib/Analysis/DataStructure/Steensgaard.cpp b/lib/Analysis/DataStructure/Steensgaard.cpp
index 747ae2f..9f0574d 100644
--- a/lib/Analysis/DataStructure/Steensgaard.cpp
+++ b/lib/Analysis/DataStructure/Steensgaard.cpp
@@ -25,11 +25,10 @@
 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 @@
 
   // 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 @@
 
   // 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;