[llvm] r186779 - Sink a typedef and comparator down to the function that actually uses them.
Chandler Carruth
chandlerc at gmail.com
Sat Jul 20 16:36:19 PDT 2013
Author: chandlerc
Date: Sat Jul 20 18:36:19 2013
New Revision: 186779
URL: http://llvm.org/viewvc/llvm-project?rev=186779&view=rev
Log:
Sink a typedef and comparator down to the function that actually uses them.
Modified:
llvm/trunk/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
Modified: llvm/trunk/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/PromoteMemoryToRegister.cpp?rev=186779&r1=186778&r2=186779&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/PromoteMemoryToRegister.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/PromoteMemoryToRegister.cpp Sat Jul 20 18:36:19 2013
@@ -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
More information about the llvm-commits
mailing list