[PATCH] D126533: [LAA] Relax pointer dependency with runtime pointer checks
Igor Kirillov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 7 08:18:30 PDT 2022
igor.kirillov added a comment.
This patch actually also enables support for the cases where we have potentially conflicting accesses that have different strides (well invariant read is technically stride equal to zero). Here's one more real-live example:
__attribute__((aligned(ALIGNMENT))) TYPE * const a = global_data.a;
__attribute__((aligned(ALIGNMENT))) TYPE * const b = global_data.b;
__attribute__((aligned(ALIGNMENT))) TYPE * const c = global_data.c;
__attribute__((aligned(ALIGNMENT))) TYPE * const d = global_data.d;
...
for (int i = 0; i < LEN/2; i++) {
a[2*i] = c[i] * b[i] + d[i] * b[i] + c[i] * c[i] + d[i] * b[i] + d[i] * c[i];
}
But we have to keep in mind that if we enable this feature then function `RuntimePointerChecking::groupChecks` will be running second time with `UseDependencies` equal to `false` and it will be emitting a lot of runtime check. There is a way to decrease that number by doing more accurate grouping and it can be implemented as follow-up patch.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D126533/new/
https://reviews.llvm.org/D126533
More information about the llvm-commits
mailing list