[llvm] [DSE] Fold malloc/store pair into calloc (PR #87048)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 29 07:41:07 PDT 2024
XChy wrote:
> Should we revert the transform when the memory region allocated by calloc will be overridden by other stores?
Sounds reasonable. `calloc` can be modelled as a `malloc` and a following `memset`/`store`, so I guess we can eliminate the virtual `memset`/`store` as DSE has done for real memorydef. But I'm not that familiar with the code of DSE. @fhahn, could you provide any insight?
https://github.com/llvm/llvm-project/pull/87048
More information about the llvm-commits
mailing list