[PATCH] D108885: [Delinerization] Keep array element byte offset.
Michael Kruse via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 9 10:53:46 PDT 2021
Meinersbur added a comment.
> I also have concerns about the current implementation not being able to handle arrays of structures.
D109527 <https://reviews.llvm.org/D109527>
> maybe we can heuristically pick something that does divide it evenly (eg a GCD or just choosing 1). If we choose 1, DA is able to produce expected result (with -da-disable-delinearization-checks)
A dimension of size 1 can be omitted since its only valid with a subscript of 0 and multiplies by 1. What makes delinearization useful is that allowing to assume that memory accesses only alias if all subscripts are equal (and the arrays themselves dot overlap)[*]. For this to work the subscripts must be between 0 and the dimension size. `-da-disable-delinearization-checks` skips this check and therefore may cause miscompilation.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108885/new/
https://reviews.llvm.org/D108885
More information about the llvm-commits
mailing list