[patch] fix -da-delinearize

Sebastian Pop spop at codeaurora.org
Thu Feb 6 13:56:41 PST 2014


Hi Hal, Preston, all,

After having used a bit -da-delinearize, the data dependence analysis with
delinearization, I have found and fixed three corner cases:

- because the delinearization is not a global analysis pass, it will compute the
  delinearization independently of knowledge about the way the delinearization
  happened for other data accesses to the same array: the dependence analysis
  will only trigger the delinearization on a tuple of access functions, and thus
  delinearization may compute different subscripts sizes for a same array.  When
  that happens the safest is to discard the delinearized information.

- in the dependence test, we used to discard some information that the
  delinearization provides: the size of the innermost dimension of an array,
  i.e., the size of scalars stored in the array, and the remainder of the
  delinearization that provides the offset from which the array reads start,
  i.e., the base address of the array.

  To avoid losing this data in the rest of the data dependence analysis, the fix
  is to multiply the access function in the last delinearized dimension by its
  size, effectively making the size of the last dimension to always be in bytes,
  and then add the remainder of delinearization to the last subscript,
  effectively making the last subscript start at the base address of the array.

- handle special cases Step==1, Step==-1, GCD==1, and GCD==-1.

- add -da-delinearize runs and checks to the existing data dependence testcases.

Ok to commit to trunk?

Thanks,
Sebastian
-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-fail-delinearization-when-the-size-of-subscripts-dif.patch
Type: text/x-diff
Size: 2021 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140206/b80d899b/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-normalize-the-last-delinearized-dimension.patch
Type: text/x-diff
Size: 2910 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140206/b80d899b/attachment-0001.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-fix-a-corner-case-in-delinearization.patch
Type: text/x-diff
Size: 3407 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140206/b80d899b/attachment-0002.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-add-da-delinearize-runs-and-checks-to-MIV-testcases.patch
Type: text/x-diff
Size: 13889 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140206/b80d899b/attachment-0003.patch>


More information about the llvm-commits mailing list