[PATCH] D86300: [OpenMPOpt][SplitMemTransfer] Getting values stored in offload arrays

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 31 10:11:10 PDT 2020


jdoerfert added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/OpenMPOpt.cpp:505
+      if (Dst == Array) {
+        int64_t Idx = Offset / PointerSize;
+        StoredValues[Idx] = getUnderlyingObject(S->getValueOperand());
----------------
hamax97 wrote:
> jdoerfert wrote:
> > bail if `Idx * PointerSize != Offset`.
> Why would that happen?. I tried getting the size of the type stored, the problem is that even for `%offload_sizes` which  is an array of `i64` the offset returned is 8 bytes for example, not 64 bytes. That's why I assumed it to be always divided by the size of a pointer instead of the size of the type stored.
it should not happen but it can it the pointer is casted before the store.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D86300/new/

https://reviews.llvm.org/D86300



More information about the llvm-commits mailing list