[PATCH] D33688: [Polly] Heap allocation for new arrays
Andreas Simbuerger via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 7 05:12:07 PDT 2017
simbuerg added inline comments.
================
Comment at: lib/CodeGen/IslNodeBuilder.cpp:1430-1434
+ auto *CreatedArray = CallInst::CreateMalloc(
+ &*InstIt, IntPtrTy, SAI->getElementType(),
+ ConstantInt::get(Type::getInt64Ty(Ctx), Size),
+ ConstantInt::get(Type::getInt64Ty(Ctx), ArraySizeInt), nullptr,
+ SAI->getName());
----------------
Meinersbur wrote:
> Where is the memory free'd?
Good Catch. We just discussed possible locations for the free. The easiest way would be the exit(s) of the SCoP. However, to keep it simple, we would have to do a copy-in/-out to the original array base pointer, right? Everything else (e.g. calculating lexicographic maximal accesses) would give us trouble with non-polyhedral accesses between SCoPs.
https://reviews.llvm.org/D33688
More information about the llvm-commits
mailing list