mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-11 16:37:42 +00:00
Use use_empty() instead of getNumUses(), avoiding a use list traversal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52651 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b3db9c90d2
commit
cb41e6bf52
@ -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…
x
Reference in New Issue
Block a user