1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00

Use empty() instead of comparing size() with zero.

llvm-svn: 46554
This commit is contained in:
Nick Lewycky 2008-01-30 07:54:16 +00:00
parent 719599d263
commit e3818dcc4e

View File

@ -420,7 +420,7 @@ bool DSE::handleEndBlock(BasicBlock& BB,
} else {
// For any non-memory-affecting non-terminators, DCE them as we reach them
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
for (Instruction::op_iterator OI = CI->op_begin(), OE = CI->op_end();