[PATCH] D33688: [Polly] Heap allocation for new arrays

Andreas Simbuerger via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 27 15:36:13 PDT 2017


simbuerg added a comment.

Allright, I just committed the size-check with test. From my side this patch is ready as soon as:

- Rebase is done
- Commit message gives a usefull description of what this patch does.

Currently the message is as follows:

> Add the option to allocate arrays on heap instead of stack while creating new arrays.
> 
> For now, a cli option is used to enable the heap allocation. But at the end, this information will be included in the imported json file.
> 
> To allocate on the heap, I use the CreateMalloc function with the following parameters :
> 
> Instruction * InsertBefore : The same instruction used for stack allocation.
>  Type * IntPtrTy : For now, a int64.
>  Type * AllocTy : The type of an element of the array.
>  Value * AllocSize : The size of an element of the array.
>  Value * ArraySize : The product of the size of all dimensions.
>  Function * MallocF : nullptr to use the default malloc function.
>  const Twine &Name : The name of the SAI.

What we need here is a description of the patch, something that
answers:

- Where do we add what?
- When is it freed?
- Why do we need this?


https://reviews.llvm.org/D33688





More information about the llvm-commits mailing list