[llvm] Support non-malloc functions in malloc+memset->calloc fold (PR #138299)

Andrew Pinski via llvm-commits llvm-commits at lists.llvm.org
Fri May 2 16:28:07 PDT 2025


pinskia wrote:

>And it's probably not worthwhile to try to extend it in a way to make it work.

I think it is worth it because there are some programs out there that use xmalloc and it might be useful to optimize that to xcalloc.
In the GCC bug about the new attribute (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120072) I mentioned about this specific thing.

https://github.com/llvm/llvm-project/pull/138299


More information about the llvm-commits mailing list