projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0ed2da9
)
Avoid performing two identical lookups when one will suffice
author
Chris Lattner
<sabre@nondot.org>
Wed, 10 Dec 2003 16:57:24 +0000
(16:57 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Wed, 10 Dec 2003 16:57:24 +0000
(16:57 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10370
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Scalar/LICM.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Scalar/LICM.cpp
b/lib/Transforms/Scalar/LICM.cpp
index 2293c17c00154011e913658ec4987a090e999536..cab43bd9fe1fa3c1f133e83397a461de14a5df78 100644
(file)
--- a/
lib/Transforms/Scalar/LICM.cpp
+++ b/
lib/Transforms/Scalar/LICM.cpp
@@
-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))