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:
b3db9c9
)
Use use_empty() instead of getNumUses(), avoiding a use list traversal.
author
Dan Gohman
<gohman@apple.com>
Mon, 23 Jun 2008 23:23:49 +0000
(23:23 +0000)
committer
Dan Gohman
<gohman@apple.com>
Mon, 23 Jun 2008 23:23:49 +0000
(23:23 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52651
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Scalar/LoopDeletion.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Scalar/LoopDeletion.cpp
b/lib/Transforms/Scalar/LoopDeletion.cpp
index 3c0e8662a25583bf4dc5553b5657b30b40ff210e..f68a5f7125a064520692c20181f3bac4d269e2af 100644
(file)
--- a/
lib/Transforms/Scalar/LoopDeletion.cpp
+++ b/
lib/Transforms/Scalar/LoopDeletion.cpp
@@
-209,7
+209,7
@@
bool LoopDeletion::runOnLoop(Loop* L, LPPassManager& LPM) {
for (BasicBlock::iterator BI = (*LI)->begin(), BE = (*LI)->end();
BI != BE; ) {
Instruction* I = BI++;
for (BasicBlock::iterator BI = (*LI)->begin(), BE = (*LI)->end();
BI != BE; ) {
Instruction* I = BI++;
- if (
I->getNumUses() > 0
&& IsLoopInvariantInst(I, L))
+ if (
!I->use_empty()
&& IsLoopInvariantInst(I, L))
I->moveBefore(preheader->getTerminator());
}
I->moveBefore(preheader->getTerminator());
}