[PATCH] D114035: [DSE] Improve handling of `strncpy` in Dead Store Elimination
Dávid Bolvanský via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 18 08:27:11 PST 2021
xbolva00 added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp:1441
+ isReadClobber(KillingLoc, CurrentI)) {
+ if (const auto *CB = dyn_cast<CallBase>(CurrentI)) {
+ LibFunc LF;
----------------
fhahn wrote:
> fhahn wrote:
> > having this logic here makes the code harder to read. Can this be moved to `isReadClobber`? Or into `BasicAAResult::getModRefInfo` directly?
> Actually this should not be needed, because `strncpy` already *has* the correct attributes (first arg write only, second arg readonly and function argmemonly), right?
According to BuildLibCalls, yes, right.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114035/new/
https://reviews.llvm.org/D114035
More information about the llvm-commits
mailing list