Memory Access - Offset

Giorgio Zacharo via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 27 09:01:12 PDT 2015


Dear All,

My name is Georgios Zacharopoulos and I am a freshly started PhD student in
Università della Svizzera italiana (USI) in Lugano.

I am currently working with Polly-LLVM in order to identify certain
characteristics of applications in the respective ScoPs of said
applications.
In the latest version of Polly there was an addition of an *Offset *parameter
in the *MemoryAccess *class at the ScopInfo.h file. This offset parameter
is the Accessed memory location relative to the parameter's Base Address (
*BaseAddr)*, which is the initial accessed array's address. As an example
we have the following Read access that resides in the body loop of the
second innermost loop.

Read image1[{{2050,+,1024}<nw><%for.cond.1.preheader>,+,1}<nw><%for.body.3>]


This part printed:
"{{2050,+,1024}<nw><%for.cond.1.preheader>,+,1}<nw><%for.body.3>" is the
offset that according to the description in the ScopInfo.h file can only be
printed at the moment, but not accessed or retrieved. I am interested in
retrieving the first constant number from this offset, so in this case:
"2050". But since the offset is private, I am not allowed to access it
directly. So my question is if there is any way that I can retrieve this
number from Memory Accesses like the example above. I believe the way to do
it is by using functions and objects from *isl library, *but unfortunately
I was not able to achieve it.

I am able to retrieve the Access Relation of such a Memory Access which is
an isl_map object:

{ Stmt_for_body_3[i0, i1] -> MemRef_image1[2050 + 1024i0 + i1] }



I am suspecting that by manipulating this object with the appropriate isl
operations I could retrieve this number, "2050" in this case, from the
Access Relation.
If you have any suggestions or tips please let me know.

-- 
Best Regards,
Georgios Zacharopoulos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150927/c053fdda/attachment.html>


More information about the llvm-commits mailing list