mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-15 07:59:50 +00:00
Avoid performing two identical lookups when one will suffice
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10370 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0ed2da9ac7
commit
f594a03197
@ -603,9 +603,7 @@ void LICM::PromoteValuesInLoop() {
|
||||
|
||||
const std::vector<BasicBlock*> &ExitBlocks = CurLoop->getExitBlocks();
|
||||
for (unsigned i = 0, e = ExitBlocks.size(); i != e; ++i)
|
||||
if (!ProcessedBlocks.count(ExitBlocks[i])) {
|
||||
ProcessedBlocks.insert(ExitBlocks[i]);
|
||||
|
||||
if (ProcessedBlocks.insert(ExitBlocks[i]).second) {
|
||||
// Copy all of the allocas into their memory locations...
|
||||
BasicBlock::iterator BI = ExitBlocks[i]->begin();
|
||||
while (isa<PHINode>(*BI))
|
||||
|
Loading…
Reference in New Issue
Block a user