[llvm-commits] [llvm] r46554 - /llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp
Nick Lewycky
nicholas at mxc.ca
Tue Jan 29 23:54:17 PST 2008
Author: nicholas
Date: Wed Jan 30 01:54:16 2008
New Revision: 46554
URL: http://llvm.org/viewvc/llvm-project?rev=46554&view=rev
Log:
Use empty() instead of comparing size() with zero.
Modified:
llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp?rev=46554&r1=46553&r2=46554&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp Wed Jan 30 01:54:16 2008
@@ -420,7 +420,7 @@
} 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();
More information about the llvm-commits
mailing list