Changes For Bug 352
[oota-llvm.git] / lib / Analysis / DataStructure / DataStructure.cpp
index 751d66c83757d51c0bf94cedb0b625f186c26fb9..de34265f2abc0dccd12f3a761bde188103941245 100644 (file)
 #include "llvm/Analysis/DataStructure/DSGraphTraits.h"
 #include "llvm/Function.h"
 #include "llvm/GlobalVariable.h"
-#include "llvm/iOther.h"
+#include "llvm/Instructions.h"
 #include "llvm/DerivedTypes.h"
 #include "llvm/Target/TargetData.h"
 #include "llvm/Assembly/Writer.h"
-#include "Support/CommandLine.h"
-#include "Support/Debug.h"
-#include "Support/DepthFirstIterator.h"
-#include "Support/STLExtras.h"
-#include "Support/Statistic.h"
-#include "Support/Timer.h"
+#include "llvm/Support/CommandLine.h"
+#include "llvm/Support/Debug.h"
+#include "llvm/ADT/DepthFirstIterator.h"
+#include "llvm/ADT/STLExtras.h"
+#include "llvm/ADT/Statistic.h"
+#include "llvm/Support/Timer.h"
 #include <algorithm>
 using namespace llvm;
 
@@ -1589,20 +1589,25 @@ static void removeIdenticalCalls(std::vector<DSCallSite> &Calls) {
 void DSGraph::removeTriviallyDeadNodes() {
   TIME_REGION(X, "removeTriviallyDeadNodes");
 
+#if 0
+  /// NOTE: This code is disabled.  This slows down DSA on 177.mesa
+  /// substantially!
+
   // Loop over all of the nodes in the graph, calling getNode on each field.
   // This will cause all nodes to update their forwarding edges, causing
   // forwarded nodes to be delete-able.
+  { TIME_REGION(X, "removeTriviallyDeadNodes:node_iterate");
   for (node_iterator NI = node_begin(), E = node_end(); NI != E; ++NI) {
     DSNode *N = *NI;
     for (unsigned l = 0, e = N->getNumLinks(); l != e; ++l)
       N->getLink(l*N->getPointerSize()).getNode();
   }
+  }
 
   // NOTE: This code is disabled.  Though it should, in theory, allow us to
   // remove more nodes down below, the scan of the scalar map is incredibly
   // expensive for certain programs (with large SCCs).  In the future, if we can
   // make the scalar map scan more efficient, then we can reenable this.
-#if 0
   { TIME_REGION(X, "removeTriviallyDeadNodes:scalarmap");
 
   // Likewise, forward any edges from the scalar nodes.  While we are at it,