[PATCH] D108885: [Delinerization] Keep array element byte offset.
Bardia Mahjour via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 9 15:45:57 PDT 2021
bmahjour added inline comments.
================
Comment at: llvm/lib/Analysis/DependenceAnalysis.cpp:3458-3467
+ if (!SrcSubscripts.empty()) {
+ const SCEV *EltOffset = SrcSubscripts.pop_back_val();
+ if (!EltOffset->isZero())
+ return false;
+ }
+ if (!DstSubscripts.empty()) {
+ const SCEV *EltOffset = DstSubscripts.pop_back_val();
----------------
I think we should care more about the difference between the byte offset of the source and destination, than its actual value. If the byte offsets are equal, then the rest of the subscripts should be analyzed. If they are different, then we don't know how to handle them yet.
suggestion: replace it with the following and move it after checking that the subscript arrays are equal in size and contain at least 2 elements each (line 3457 of the base).
```
const SCEV *EltOffsetSrc = SrcSubscripts.pop_back_val();
const SCEV *EltOffsetDst = DstSubscripts.pop_back_val();
if (EltOffsetSrc != EltOffsetDst)
return false;
```
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