mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-23 12:08:25 +00:00
Use use_empty() instead of getNumUses(), avoiding a use list traversal.
llvm-svn: 52651
This commit is contained in:
parent
f2386cff4f
commit
11d367fd0c
@ -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++;
|
||||
if (I->getNumUses() > 0 && IsLoopInvariantInst(I, L))
|
||||
if (!I->use_empty() && IsLoopInvariantInst(I, L))
|
||||
I->moveBefore(preheader->getTerminator());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user