[PATCH] D115962: [DSE] Make isRemovable() for calls more robust (NFCI)
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 17 11:53:45 PST 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGeb2cad8329b0: [DSE] Make isRemovable() for calls more robust (NFCI) (authored by nikic).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115962/new/
https://reviews.llvm.org/D115962
Files:
llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
Index: llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
===================================================================
--- llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
+++ llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
@@ -206,9 +206,9 @@
}
}
- // note: only get here for calls with analyzable writes - i.e. libcalls
+ // note: only get here for calls with analyzable writes.
if (auto *CB = dyn_cast<CallBase>(I))
- return CB->use_empty();
+ return CB->use_empty() && CB->willReturn() && CB->doesNotThrow();
return false;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115962.395189.patch
Type: text/x-patch
Size: 571 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211217/4aedabb7/attachment.bin>
More information about the llvm-commits
mailing list