[PATCH] D45872: [DA] Enable -da-delinearize by default
Hal Finkel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 22 15:50:16 PDT 2018
hfinkel added a comment.
In https://reviews.llvm.org/D45872#1073553, @grosser wrote:
> We probably need to also add code that ensures that the arrays that result from delinearization remain within bounds. Without this code, the resulting checks are likely incorrect.
I agree. To be clear, I think that this means addressing the FIXME in the code:
// The delinearization transforms a single-subscript MIV dependence test into
// a multi-subscript SIV dependence test that is easier to compute. So we
// resize Pair to contain as many pairs of subscripts as the delinearization
// has found, and then initialize the pairs following the delinearization.
Pair.resize(size);
for (int i = 0; i < size; ++i) {
Pair[i].Src = SrcSubscripts[i];
Pair[i].Dst = DstSubscripts[i];
unifySubscriptType(&Pair[i]);
// FIXME: we should record the bounds SrcSizes[i] and DstSizes[i] that the
// delinearization has found, and add these constraints to the dependence
// check to avoid memory accesses overflow from one dimension into another.
// This is related to the problem of determining the existence of data
// dependences in array accesses using a different number of subscripts: in
// C one can access an array A[100][100]; as A[0][9999], *A[9999], etc.
}
I'd assumed that is why delinearization is disabled by default.
https://reviews.llvm.org/D45872
More information about the llvm-commits
mailing list