[PATCH] D115167: [DSE] Use precise loc for memset_chk writing to local objects.
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 13 11:44:30 PST 2021
nikic added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp:1041
+ // executes. So it either writes exactly the number of specified bytes
+ // or the program gets aborted.
+ if (const auto *Len = dyn_cast<ConstantInt>(CB->getArgOperand(2))) {
----------------
fhahn wrote:
> nikic wrote:
> > This hold for AA results in general though (they are only valid under the assumption of execution), so maybe it's okay to return a precise result directly in MemoryLocation?
> Hm, I am not sure. For AA it should be fine for the same reasons it's fine for DSE, but I am not sure about some of the other users? Grepping surfaces a couple of additional ones.
Looking through other `MemoryLocation::getForDest()` users, all of them seem to be limited to handling intrinsics, not libcalls, so I don't expect issues with existing callers.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115167/new/
https://reviews.llvm.org/D115167
More information about the llvm-commits
mailing list