Sink a typedef and comparator down to the function that actually uses them.
authorChandler Carruth <chandlerc@gmail.com>
Sat, 20 Jul 2013 23:36:19 +0000 (23:36 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Sat, 20 Jul 2013 23:36:19 +0000 (23:36 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186779 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Utils/PromoteMemoryToRegister.cpp

index bb215cd14407efed4b9df0154f0919ec0c04de69..bddb243f311c433a81a68fa33980763bb62012b3 100644 (file)
@@ -324,14 +324,6 @@ struct AllocaInfo {
   }
 };
 
-typedef std::pair<DomTreeNode *, unsigned> DomTreeNodePair;
-
-struct DomTreeNodeCompare {
-  bool operator()(const DomTreeNodePair &LHS, const DomTreeNodePair &RHS) {
-    return LHS.second < RHS.second;
-  }
-};
-
 } // end of anonymous namespace
 
 static void removeLifetimeIntrinsicUsers(AllocaInst *AI) {
@@ -724,6 +716,16 @@ void PromoteMem2Reg::ComputeLiveInBlocks(
   }
 }
 
+namespace {
+typedef std::pair<DomTreeNode *, unsigned> DomTreeNodePair;
+
+struct DomTreeNodeCompare {
+  bool operator()(const DomTreeNodePair &LHS, const DomTreeNodePair &RHS) {
+    return LHS.second < RHS.second;
+  }
+};
+} // end anonymous namespace
+
 /// At this point, we're committed to promoting the alloca using IDF's, and the
 /// standard SSA construction algorithm.  Determine which blocks need phi nodes
 /// and see if we can optimize out some work by avoiding insertion of dead phi