[PATCH] D157738: [OpenMP] Emit offloading entries for indirect target variables

Joseph Huber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 14 15:43:21 PDT 2023


jhuber6 marked an inline comment as done.
jhuber6 added inline comments.


================
Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:1996-1997
+                                                llvm::GlobalValue *GV) {
+  std::optional<OMPDeclareTargetDeclAttr *> ActiveAttr =
+      OMPDeclareTargetDeclAttr::getActiveAttr(FD);
+
----------------
arsenm wrote:
> not a huge fan of std::optional<pointer>
This is pretty far entrenched in the Clang handling for this attribute so I don't intend to change it here.


================
Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:2022
+  OMPBuilder.OffloadInfoManager.registerDeviceGlobalVarEntryInfo(
+      Name, Addr, CGM.getContext().getTypeSize(CGM.getContext().VoidPtrTy) / 8,
+      llvm::OffloadEntriesInfoManager::OMPTargetGlobalVarEntryIndirect,
----------------
arsenm wrote:
> isn't there a store size?
Yeah I can use that instead.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D157738



More information about the cfe-commits mailing list