summaryrefslogtreecommitdiff
path: root/lib/Transforms/Scalar/DeadStoreElimination.cpp
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2008-01-30 08:01:28 +0000
committerNick Lewycky <nicholas@mxc.ca>2008-01-30 08:01:28 +0000
commitb4b04172206810623845a7f11dd3a65b0b3b10d5 (patch)
tree57c51dcee8d3edd29a9d997ea767c5df15857c79 /lib/Transforms/Scalar/DeadStoreElimination.cpp
parentc7444498eebb654ea089df8ec52dba5f84f9a108 (diff)
downloadllvm-b4b04172206810623845a7f11dd3a65b0b3b10d5.tar.gz
llvm-b4b04172206810623845a7f11dd3a65b0b3b10d5.tar.bz2
llvm-b4b04172206810623845a7f11dd3a65b0b3b10d5.tar.xz
Remove a couple more cases of "getNumUses() == 0". No need to walk the linked
list just to see if whether the list is empty. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46555 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/DeadStoreElimination.cpp')
-rw-r--r--lib/Transforms/Scalar/DeadStoreElimination.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/DeadStoreElimination.cpp b/lib/Transforms/Scalar/DeadStoreElimination.cpp
index 2e6db3addf..179dab37fa 100644
--- a/lib/Transforms/Scalar/DeadStoreElimination.cpp
+++ b/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