diff options
| author | Chris Lattner <sabre@nondot.org> | 2008-12-01 06:52:57 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2008-12-01 06:52:57 +0000 |
| commit | 2b07d3ccde9a53925681b00f6f457cabd5ccfee7 (patch) | |
| tree | c1a41280f59a791faa8dcc5ea141f8128ebe618d /llvm/lib/Transforms/Scalar/LoopUnswitch.cpp | |
| parent | a29f0e19ff61283e08d83c412d3869c07e273ece (diff) | |
| download | bcm5719-llvm-2b07d3ccde9a53925681b00f6f457cabd5ccfee7.tar.gz bcm5719-llvm-2b07d3ccde9a53925681b00f6f457cabd5ccfee7.zip | |
switch a couple more calls to use array_pod_sort.
llvm-svn: 60337
Diffstat (limited to 'llvm/lib/Transforms/Scalar/LoopUnswitch.cpp')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/LoopUnswitch.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp b/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp index 31e875275b8..2bf194dbb73 100644 --- a/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp +++ b/llvm/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. |

