mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
Use empty() instead of comparing size() with zero.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46554 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -420,7 +420,7 @@ bool DSE::handleEndBlock(BasicBlock& BB,
|
|||||||
} else {
|
} else {
|
||||||
// For any non-memory-affecting non-terminators, DCE them as we reach them
|
// For any non-memory-affecting non-terminators, DCE them as we reach them
|
||||||
Instruction *CI = BBI;
|
Instruction *CI = BBI;
|
||||||
if (!CI->isTerminator() && CI->getNumUses() == 0 && !isa<FreeInst>(CI)) {
|
if (!CI->isTerminator() && CI->use_empty() && !isa<FreeInst>(CI)) {
|
||||||
|
|
||||||
// DCE instructions only used to calculate that load
|
// DCE instructions only used to calculate that load
|
||||||
for (Instruction::op_iterator OI = CI->op_begin(), OE = CI->op_end();
|
for (Instruction::op_iterator OI = CI->op_begin(), OE = CI->op_end();
|
||||||
|
Reference in New Issue
Block a user