[PATCH] D150706: [LAA] Update MaxSafeDepDistBytes when non-unit stride
Michael Maitland via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 16 12:14:01 PDT 2023
michaelmaitland created this revision.
michaelmaitland added reviewers: reames, fhahn, Ayal, ABataev, nikolaypanchenko.
Herald added subscribers: StephenFan, hiraditya.
Herald added a project: All.
michaelmaitland requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
MaxSafeDepDistBytes must be updated according to the stride
of the loop, otherwise it is possible that the value is
not conservative enough. For example:
for (int k = 0; k < len; k+=3) {
a[k] = a[k+4];
a[k+2] = a[k+6];
}
has MaxSafeDepDistBytes=8. However, if we do not use the stride
in the calculation, we incorrectly compute MaxSafeDepDistBytes=24.
This change is related to 682cfc1, however, that change did not
go far enough and set MaxSafeDepDistBytes according to stride.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D150706
Files:
llvm/lib/Analysis/LoopAccessAnalysis.cpp
llvm/test/Analysis/LoopAccessAnalysis/depend_diff_types.ll
llvm/test/Analysis/LoopAccessAnalysis/depend_diff_types_opaque_ptr.ll
llvm/test/Analysis/LoopAccessAnalysis/max_safe_dep_dist_non_unit_stride.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D150706.522737.patch
Type: text/x-patch
Size: 5180 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230516/eebdfd19/attachment.bin>
More information about the llvm-commits
mailing list