[PATCH] D49024: [Polly] [WIP] Introduce ShapeInfo into polly for sizes and strides.

SAHIL GIRISH YERAWAR via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 4 03:32:43 PDT 2018


cs15btech11044 updated this revision to Diff 159178.
cs15btech11044 edited the summary of this revision.
cs15btech11044 set the repository for this revision to rPLO Polly.
cs15btech11044 added a comment.

For Chapel Arrays with custom dimension ranges (like arr[1..4][1..4] for instance), there were two issues

- For generating OffsetValue in the Kernel function for GPU, there wasn't any reference to the value counterpart given to `expandCodeFor()` in `IslExprBuilder.cpp`.  It is fixed by passing the GlobalMap to the function.

- While testing the code with arrays as above, there was no need to compute getArrayOffset() for Chapel case, since Chapel internally takes care of its indices to make it 0 based. PPCGCodegen is unaware of this fact and still generates offsets which results in out of bound accesses which are originally valid.  For now, I have commented it out, but I would love to have a more concrete solution here. Would having an extra flag for Polly which toggles this change would suffice?


Repository:
  rPLO Polly

https://reviews.llvm.org/D49024

Files:
  include/polly/CodeGen/IslExprBuilder.h
  include/polly/CodeGen/IslNodeBuilder.h
  include/polly/ScopBuilder.h
  include/polly/ScopInfo.h
  include/polly/Support/ScopHelper.h
  lib/Analysis/ScopBuilder.cpp
  lib/Analysis/ScopDetection.cpp
  lib/Analysis/ScopInfo.cpp
  lib/CodeGen/IslExprBuilder.cpp
  lib/CodeGen/IslNodeBuilder.cpp
  lib/CodeGen/PPCGCodeGeneration.cpp
  lib/Support/ScopHelper.cpp
  lib/Transform/ForwardOpTree.cpp
  test/GPGPU/chpl_2d_init_shapeinfo_ppcg.ll
  test/ScopInfo/chpl_2d_init_shapeinfo.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49024.159178.patch
Type: text/x-patch
Size: 83962 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180804/5793537c/attachment.bin>


More information about the llvm-commits mailing list