[PATCH] D101176: [SimplifyLibCalls] Transform malloc to calloc with redundant memsets elimination (PR25892)
Dawid Jurczak via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 7 04:55:27 PDT 2021
yurai007 added a comment.
> Do you actually need to check this? The transform is correct either way... although maybe it's a bit dubious to transform malloc->calloc if the memset is rarely executed and/or smaller than the allocation.
It may be redundant. Patch is inspired by previous work and by GCC solution: https://patchwork.ozlabs.org/project/gcc/patch/alpine.DEB.2.02.1402282337290.27023@stedding.saclay.inria.fr/ .
In both cases they do such matching which doesn't mean yet it's crucial.
> DSE currently includes optimizations for memset of calloc.
I assume you mean recent: https://reviews.llvm.org/D101391. Yes, it would be good to integrate this change with DSE on top of D101391 <https://reviews.llvm.org/D101391>.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101176/new/
https://reviews.llvm.org/D101176
More information about the llvm-commits
mailing list