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

Matt Arsenault via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 14 15:02:11 PDT 2023


arsenm added inline comments.


================
Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:1996-1997
+                                                llvm::GlobalValue *GV) {
+  std::optional<OMPDeclareTargetDeclAttr *> ActiveAttr =
+      OMPDeclareTargetDeclAttr::getActiveAttr(FD);
+
----------------
not a huge fan of std::optional<pointer>


================
Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:2017
+                                    /*isConstant=*/true,
+                                    llvm::GlobalValue::ExternalLinkage, GV, Name);
+    Addr->setVisibility(llvm::GlobalValue::ProtectedVisibility);
----------------
target global address space


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


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