From: Chandler Carruth Date: Sat, 20 Jul 2013 23:36:19 +0000 (+0000) Subject: Sink a typedef and comparator down to the function that actually uses them. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=61cb90f12202f07ead9d4532ee07904487cbfe6e;p=oota-llvm.git Sink a typedef and comparator down to the function that actually uses them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186779 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Utils/PromoteMemoryToRegister.cpp b/lib/Transforms/Utils/PromoteMemoryToRegister.cpp index bb215cd1440..bddb243f311 100644 --- a/lib/Transforms/Utils/PromoteMemoryToRegister.cpp +++ b/lib/Transforms/Utils/PromoteMemoryToRegister.cpp @@ -324,14 +324,6 @@ struct AllocaInfo { } }; -typedef std::pair 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 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