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

Michael Kruse via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 26 05:58:41 PDT 2016


2016-08-26 13:22 GMT+02:00 Michael Kruse <llvm-commits at meinersbur.de>:
>>> To add a reference to it, it
>>> seems that one has to call the reference also "A". Eg.
>>>  "{ Stmt_bb12[i0, i1, i2] -> A[i2, i0] }"
>>>
>>> Let's create a new array named "MemRef_A". Then we set an array accesses to
>>>  "{ Stmt_bb12[i0, i1, i2] -> MemRef_A[i2, i0] }"
>>> Does it now
>>> 1) refer to the previously existing array "A"
>>> 2) refer to the newly created array "MemRef_A"
>>> ????
>>
>> As far as I understand it now refers to the previously existing array "A".
>
> I will create a test case for this, so we will see whether I am mistaken.
>
>
>>>> Do you mean that it's better to add prefix "MemRef_" to names of all
>>>> arrays added in a JSCoP?
>>>
>>> Yes.
>>
>> I thought it would be more intuitive to work with names of isl_ids of
>> arrays, because they are used to describe, for example, access
>> relations of JSCoP and arrays of ScopInfos.
>>
>> OK. If we everyone agrees with it, let's export names of arrays
>> instead names of their isl_ids.
>
> Either have "MemRef_" everywhere, or none at all for consistency. I'd
> agree to both approaches, as long as it is consistent.
>
> The prefix might have a purpose because ISL compares isl_id's only by
> their name, but not by their user part.


OK, I see that it is somewhat different than I first imagined it to
be. Polly prefixes array names found in the source code with "MemRef_"
as ScopArrayInfo::getName() returns it (not only the
references/MemoryAccesses/isl_id to it as I had in mind). Therefore it
is the choice of the user to also prefix them with "MemRef_" or not.
Why we prefix them would be another discussion.

Therefore, please ignore may remarks on this, they do not apply.


Michael


More information about the llvm-commits mailing list