aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Scalar/LoopUnswitch.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-12-01 06:52:57 +0000
committerChris Lattner <sabre@nondot.org>2008-12-01 06:52:57 +0000
commita3522000ab9c821f48856d0c25ada8297c1c2914 (patch)
tree686fb51449b2bc877a9608cb7afd3ceb8427a3fc /lib/Transforms/Scalar/LoopUnswitch.cpp
parent4329c428404981fb752b51eaec54b451de83a5b0 (diff)
switch a couple more calls to use array_pod_sort.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60337 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/LoopUnswitch.cpp')
-rw-r--r--lib/Transforms/Scalar/LoopUnswitch.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/LoopUnswitch.cpp b/lib/Transforms/Scalar/LoopUnswitch.cpp
index 31e875275b..2bf194dbb7 100644
--- a/lib/Transforms/Scalar/LoopUnswitch.cpp
+++ b/lib/Transforms/Scalar/LoopUnswitch.cpp
@@ -41,6 +41,7 @@
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/ADT/SmallPtrSet.h"
+#include "llvm/ADT/STLExtras.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Debug.h"
@@ -834,14 +835,14 @@ void LoopUnswitch::RemoveBlockIfDead(BasicBlock *BB,
// Remove phi node entries in successors for this block.
TerminatorInst *TI = BB->getTerminator();
- std::vector<BasicBlock*> Succs;
+ SmallVector<BasicBlock*, 4> Succs;
for (unsigned i = 0, e = TI->getNumSuccessors(); i != e; ++i) {
Succs.push_back(TI->getSuccessor(i));
TI->getSuccessor(i)->removePredecessor(BB);
}
// Unique the successors, remove anything with multiple uses.
- std::sort(Succs.begin(), Succs.end());
+ array_pod_sort(Succs.begin(), Succs.end());
Succs.erase(std::unique(Succs.begin(), Succs.end()), Succs.end());
// Remove the basic block, including all of the instructions contained in it.