[llvm] [DA] handle memory accesses with different offsets and strides (PR #123436)
Ryotaro Kasuga via llvm-commits
llvm-commits at lists.llvm.org
Tue May 13 01:48:56 PDT 2025
================
@@ -3617,30 +3633,79 @@ DependenceInfo::depends(Instruction *Src, Instruction *Dst) {
break; // The underlying objects alias; test accesses for dependence.
}
- // establish loop nesting levels
- establishNestingLevels(Src, Dst);
- LLVM_DEBUG(dbgs() << " common nesting levels = " << CommonLevels << "\n");
- LLVM_DEBUG(dbgs() << " maximum nesting levels = " << MaxLevels << "\n");
-
- FullDependence Result(Src, Dst, PossiblyLoopIndependent, CommonLevels);
- ++TotalArrayPairs;
+ if (DstLoc.Size != SrcLoc.Size || DstLoc.Size.mayBeBeforePointer() ||
+ SrcLoc.Size.mayBeBeforePointer()) {
----------------
kasuga-fj wrote:
```suggestion
if (DstLoc.Size != SrcLoc.Size || DstLoc.Size.isPrecise() ||
SrcLoc.Size.isPrecise()) {
```
I don't know much about `LocationSize`, but as reading the code, using `isPrecise` seems to be suitable to me.
https://github.com/llvm/llvm-project/pull/123436
More information about the llvm-commits
mailing list