diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2008-01-30 08:01:28 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2008-01-30 08:01:28 +0000 |
commit | 6b016703a9fb21ff2555fdc512b00cfceb3a753a (patch) | |
tree | e4afca546838259084100fb8c647d72301586a27 /llvm/lib/Transforms | |
parent | 625e89c8b0aa27d877c4f6871ba903abfde48442 (diff) | |
download | bcm5719-llvm-6b016703a9fb21ff2555fdc512b00cfceb3a753a.tar.gz bcm5719-llvm-6b016703a9fb21ff2555fdc512b00cfceb3a753a.zip |
Remove a couple more cases of "getNumUses() == 0". No need to walk the linked
list just to see if whether the list is empty.
llvm-svn: 46555
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp b/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp index 2e6db3addfa..179dab37fab 100644 --- a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp +++ b/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp @@ -327,7 +327,7 @@ bool DSE::handleEndBlock(BasicBlock& BB, if (LoadInst* L = dyn_cast<LoadInst>(BBI)) { // However, if this load is unused, we can go ahead and remove it, and // not have to worry about it making our pointer undead! - if (L->getNumUses() == 0) { + if (L->use_empty()) { MD.removeInstruction(L); // DCE instructions only used to calculate that load @@ -350,7 +350,7 @@ bool DSE::handleEndBlock(BasicBlock& BB, deadPointers.erase(A); // Dead alloca's can be DCE'd when we reach them - if (A->getNumUses() == 0) { + if (A->use_empty()) { MD.removeInstruction(A); // DCE instructions only used to calculate that load |