[polly] r214665 - Do allow negative offsets in the outermost array dimension

Tobias Grosser tobias at grosser.es
Sun Aug 3 23:59:21 PDT 2014


On 04/08/2014 08:50, Johannes Doerfert wrote:
>
> On 08/04, Tobias Grosser wrote:
>> On 04/08/2014 06:39, Johannes Doerfert wrote:
>>> What do you think?
>>
>> It is not obvious to me. The above test case looks as follows:
>>
>> +; void foo(long n, long m, long o, double A[n][m][o]) {
>> +;
>> +;   for (long i = 0; i < 100; i++)
>> +;     for (long j = 0; j < 150; j++)
>> +;       for (long k = 0; k < 200; k++)
>> +;         A[i][j][k] = 1.0;
>> +; }
>>
>> The constraints we derive are:
>>
>> +; CHECK:   [m, o] -> {  : m >= 150 and o >= 200 }
>>
>> Those are on the inner dimensions exactly as I expect.
>>
>> What kind of constraints would you expect?
> I expected the two outer dimensions, but apparently I didn't understand the
> delinearization yet.
>
> However, do we compute the size of the outermost dimension (here n)? We
> need that for privatization and runtime alias checks.

We don't. Similarly to how we do not compute a size for a 
one-dimensional array. However, you can compute the used size of the 
array just by asking isl for the minimal/maximal subscript expression 
accessed within that scop.

Cheers,
Tobias



More information about the llvm-commits mailing list