[PATCH] Delinearize _all_ accesses to a multi-dimensional array

Tobias Grosser tobias at grosser.es
Fri Sep 12 03:29:54 PDT 2014


Hi sebpop, simbuerg, dpeixott, jdoerfert,

Even though we previously correctly detected the multi-dimensional access
pattern for accesses with a certain base address, we only delinearized
non-affine accesses to this address. Affine accesses have not been touched and
remained as single dimensional accesses. The result was an inconsistent
description of accesses to the same array, with some being one dimensional and
some being multi-dimensional.

This patch ensures that all accesses are delinearized with the same
dimensionality as soon as a single one of them has been detected as non-affine.

While writing this patch, it became evident that the options
-polly-allow-nonaffine and -polly-detect-keep-going have not been properly
supported in case delinearization has been turned on. This patch adds relevant
test coverage and addresses these issues as well. We also added some more
documentation to the functions that are modified in this patch.

TODO: The documentation and the structure of this function is possibly still
      non-perfect. If reviewers can suggest ways to further improve the
      readability of this function, such comments are appreciated. Maybe we
      should outline some of the computations performed in
      hasAffineMemoryAccesses()?

This fixes llvm.org/PR20123

http://reviews.llvm.org/D5329

Files:
  include/polly/ScopDetection.h
  lib/Analysis/ScopDetection.cpp
  test/ScopDetectionDiagnostics/ReportMultipleNonAffineAccesses.ll
  test/ScopInfo/multidim_single_and_multidim_array.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5329.13621.patch
Type: text/x-patch
Size: 20631 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140912/2aceaed0/attachment.bin>


More information about the llvm-commits mailing list