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

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 20 10:49:22 PDT 2020


jdoerfert added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/OpenMPOpt.cpp:787
+  /// \p RuntimeCall into the offload arrays in \p OAs.
+  bool getValuesInOffloadArrays(CallInst &RuntimeCall, OffloadArrayPtr OAs[3]) {
+    // A runtime call that involves memory offloading looks something like:
----------------
hamax97 wrote:
> jdoerfert wrote:
> > Don't you need a reference here? We also need a test, maybe just one that prints the result?
> If I pass an array it's passed as a pointer, isn't it?.
> 
> A unittest?
I see. Make it an `ArrayRef<OffloadArrayPtr>` instead. That will make it clear and you should not need to modify the call site.

A unit test or a lit test hat looks for some output that we print for debug purposes.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86300



More information about the llvm-commits mailing list