mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-28 22:43:29 +00:00
Use SmallVector.
llvm-svn: 41230
This commit is contained in:
parent
e92ff0baef
commit
b86f1fdb3f
@ -353,7 +353,7 @@ void LoopInfo::removeBlock(BasicBlock *BB) {
|
||||
void Loop::getExitingBlocks(SmallVectorImpl<BasicBlock*> &ExitingBlocks) const {
|
||||
// Sort the blocks vector so that we can use binary search to do quick
|
||||
// lookups.
|
||||
std::vector<BasicBlock*> LoopBBs(block_begin(), block_end());
|
||||
SmallVector<BasicBlock*, 128> LoopBBs(block_begin(), block_end());
|
||||
std::sort(LoopBBs.begin(), LoopBBs.end());
|
||||
|
||||
for (std::vector<BasicBlock*>::const_iterator BI = Blocks.begin(),
|
||||
@ -372,7 +372,7 @@ void Loop::getExitingBlocks(SmallVectorImpl<BasicBlock*> &ExitingBlocks) const {
|
||||
void Loop::getExitBlocks(SmallVectorImpl<BasicBlock*> &ExitBlocks) const {
|
||||
// Sort the blocks vector so that we can use binary search to do quick
|
||||
// lookups.
|
||||
std::vector<BasicBlock*> LoopBBs(block_begin(), block_end());
|
||||
SmallVector<BasicBlock*, 128> LoopBBs(block_begin(), block_end());
|
||||
std::sort(LoopBBs.begin(), LoopBBs.end());
|
||||
|
||||
for (std::vector<BasicBlock*>::const_iterator BI = Blocks.begin(),
|
||||
@ -390,7 +390,7 @@ void Loop::getExitBlocks(SmallVectorImpl<BasicBlock*> &ExitBlocks) const {
|
||||
void Loop::getUniqueExitBlocks(SmallVectorImpl<BasicBlock*> &ExitBlocks) const {
|
||||
// Sort the blocks vector so that we can use binary search to do quick
|
||||
// lookups.
|
||||
std::vector<BasicBlock*> LoopBBs(block_begin(), block_end());
|
||||
SmallVector<BasicBlock*, 128> LoopBBs(block_begin(), block_end());
|
||||
std::sort(LoopBBs.begin(), LoopBBs.end());
|
||||
|
||||
std::vector<BasicBlock*> switchExitBlocks;
|
||||
|
Loading…
Reference in New Issue
Block a user