mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-09 13:21:30 +00:00
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
This commit is contained in:
parent
e3818dcc4e
commit
ccd60a90c5
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user