HomePhabricator

[Polly] [GPUJIT] Set min size to 1 on CUDA allocation calls. [NFC]

Authored by bollu on Aug 15 2017, 11:21 AM.

Description

[Polly] [GPUJIT] Set min size to 1 on CUDA allocation calls. [NFC]

Requesting size 0 allocations from cuMalloc / cuMallocManaged fails.
If there is a size 0 allocation that can be statically proved, the we
fail at PPCGCodeGeneration. This is because if size 0 allocation could
take place, we should not generate code that tries to use this array.

However, there are cases where we cannot statically prove this, and at
runtime we get a request for 0 bytes of memory. We choose to allocate
size 1 to allow the program to continue running.

Differential Revision: https://reviews.llvm.org/D36751

llvm-svn: 310941

Details

Committed
bolluAug 15 2017, 11:21 AM
Differential Revision
D36751: [Polly] [GPUJIT] Set min size to 1 on allocation calls.
Parents
rG638c085d07aa: [Dominators] Include infinite loops in PostDominatorTree
Branches
Unknown
Tags
Unknown