[polly] r277263 - Extend the jscop interface to allow the user to declare new arrays and to reference these arrays from access expressions

Roman Gareev via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 29 06:59:32 PDT 2016


2016-08-26 20:03 GMT+05:00 Michael Kruse <llvm-commits at meinersbur.de>:
> 2016-08-26 15:55 GMT+02:00 Roman Gareev <gareevroman at gmail.com>:
>> 2016-08-26 16:22 GMT+05:00 Michael Kruse <llvm-commits at meinersbur.de>:
>>> Sorry for the late reply. I created a test where this makes problems:
>>>
>>> https://reviews.llvm.org/D23916
>>>
>>> The issue is that ScopArrayInfo::getNumberOfDimensions() returns 3 for
>>> array E. Hence, every access to it should have 3 indices, but
>>> create_arrays___%bb9---%bb26.jscop.transformed adds one with just 2. I
>>> hope this illustrates the issue.
>>>
>>>
>>>
>>>
>>> 2016-08-12 13:36 GMT+02:00 Roman Gareev <gareevroman at gmail.com>:
>>>>>> –°ould we change the array access to three-dimensional one (e.g. "{
>>>>>> Stmt_bb12[i0, i1, i2] -> E[0, i2, i0] }")?
>>>>>
>>>>> Yes, but is it what you intended?
>>>>
>>>> I thought that in this case, it is what we intended.
>>>
>>> OK, can you change it?
>>
>> OK. I've changed it in r279821.
>
>
> Thanks again for the change. Remains an interface issue.
>
> For allocating E, the following alloca is created (from create_arrays.ll)
> %E = alloca [270336 x [200000 x double]]
> that is the implicit length of the outermost dimension is 1.
> Having an implicit size is OK for correctness, but leaks an
> implementation detail.
>
> Is it worth addressing?

I think, yes, it is.

In https://reviews.llvm.org/D23991 I've used the first dimension of
arrays to store the information about the size that is subsequently
used to allocate arrays. What do you think about it? It would probably
help to avoid the problem.

-- 
                                    Cheers, Roman Gareev.


More information about the llvm-commits mailing list