[PATCH] D139096: [DSE] Use precise loc for memcpy_chk during overwrite checks.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 2 06:24:48 PST 2022
fhahn marked an inline comment as done.
fhahn added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp:885
LibFunc F;
- if (TLI.getLibFunc(*CB, F) && TLI.has(F) && F == LibFunc_memset_chk) {
+ if (TLI.getLibFunc(*CB, F) && TLI.has(F)) {
// Use the precise location size specified by the 3rd argument during
----------------
asbirlea wrote:
> nit: will this be further extended to need the switch? or include in the `if` `( ... && (F == LibFunc_memset_chk || F == LibFunc_memcpy_chk))`?
I think `memset_chk` and `memcpy_chk` are the main ones, so I updated the code to use an `if` instead of `switch`. We can use a switch if more cases are added, thanks!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139096/new/
https://reviews.llvm.org/D139096
More information about the llvm-commits
mailing list