[PATCH] D60056: Hoist/sink malloc/free's in LICM.
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 5 14:53:20 PDT 2019
reames added inline comments.
================
Comment at: llvm/lib/Analysis/LoopAllocationInfo.cpp:92
+ II != E; ++II) {
+ if (!II->mayDeallocateMemory() && !II->mayAllocateMemory())
+ continue;
----------------
As discussed offline, bug example:
for (int i = 0; i < N; i++) {
throw_if(requested_size > TOO_BIG);
a = malloc(requested_size);
free(a);
}
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60056/new/
https://reviews.llvm.org/D60056
More information about the llvm-commits
mailing list