[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

Dhruva Chakrabarti via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 3 16:36:26 PDT 2022


dhruvachak added a comment.

Pointing out the recent changes at the corresponding source locations.



================
Comment at: clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp:1570
+                              {llvm::ConstantInt::get(CGM.SizeTy, AllocSize)});
+      GlobalPtr->addRetAttr(llvm::Attribute::get(
+          CGM.getLLVMContext(), llvm::Attribute::Alignment,
----------------
Added align attribute for call to __kmpc_alloc_shared.



================
Comment at: clang/lib/CodeGen/CGOpenMPRuntimeGPU.h:265
                         ArrayRef<llvm::Value *> CapturedVars,
+                        ArrayRef<llvm::Type *> CapturedVarsElemTypes,
                         const Expr *IfCond, llvm::Value *NumThreads) override;
----------------
CapturedVarsElemTypes added to handle opaque pointers.


================
Comment at: clang/lib/CodeGen/CodeGenFunction.h:3346
+      const CapturedStmt &S, SmallVectorImpl<llvm::Value *> &CapturedVars,
+      SmallVectorImpl<llvm::Type *> &CapturedVarsElemTypes);
   void GenerateOpenMPCapturedVars(const CapturedStmt &S,
----------------
CapturedVarsElemTypes introduced to handle opaque pointers.


================
Comment at: llvm/include/llvm/Frontend/OpenMP/OMPKinds.def:929
 
+__OMP_RTL_ATTRS(__kmpc_alloc_aggregate_arg, DefaultAttrs, ReturnPtrAttrs,
+                ParamAttrs())
----------------
Fixed attribute of __kmpc_alloc_aggregate_arg,



================
Comment at: llvm/lib/Transforms/IPO/OpenMPOpt.cpp:4266
     case OMPRTL___kmpc_nvptx_end_reduce_nowait:
+    case OMPRTL___kmpc_alloc_aggregate_arg:
       break;
----------------
Added alloc_aggregate_arg entry point to OpenMPOpt SPMD list.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102107



More information about the llvm-commits mailing list