[PATCH] D103009: [DSE] Transform memset + malloc --> calloc (PR25892)
Evgenii Stepanov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 20 11:39:27 PDT 2021
eugenis added a comment.
+1 to revert.
I'm not sure what is the LangRef change requested. This is a valid transformation, sure. It just makes the code run slower and use more memory.
It goes against the user intent in the code that is explicitly trying to avoid zero-initializing the allocated memory.
IMHO this transformation should only apply if memset can be proven to postdominate malloc *for the entire allocation size* (or at least a large part of it).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103009/new/
https://reviews.llvm.org/D103009
More information about the llvm-commits
mailing list