[PATCH] D101176: [SimplifyLibCalls] Transform malloc to calloc with redundant memsets elimination (PR25892)

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 6 13:04:31 PDT 2021


efriedma added a comment.

> some kind of matching for icmp+br pattern.

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.

DSE currently includes optimizations for memset of calloc.


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