[Mlir-commits] [flang] [llvm] [mlir] [llvm][mlir][OMPIRBuilder] Translate omp.single's copyprivate (PR #80488)

Kiran Chandramohan llvmlistbot at llvm.org
Tue Feb 27 14:53:16 PST 2024


================
@@ -4002,13 +4002,16 @@ OpenMPIRBuilder::createCopyPrivate(const LocationDescription &Loc,
 
 OpenMPIRBuilder::InsertPointTy OpenMPIRBuilder::createSingle(
     const LocationDescription &Loc, BodyGenCallbackTy BodyGenCB,
-    FinalizeCallbackTy FiniCB, bool IsNowait, llvm::Value *DidIt) {
+    FinalizeCallbackTy FiniCB, bool IsNowait, ArrayRef<llvm::Value *> CPVars,
+    ArrayRef<llvm::Function *> CPFuncs) {
 
   if (!updateToLocation(Loc))
     return Loc.IP;
 
-  // If needed (i.e. not null), initialize `DidIt` with 0
-  if (DidIt) {
+  // If needed allocate and initialize `DidIt` with 0
+  llvm::Value *DidIt = nullptr;
----------------
kiranchandramohan wrote:

Nit: A comment is probably needed to signify what DidIt represents. 
```
didit	flag variable: 1=single thread; 0=not single thread
```

https://github.com/llvm/llvm-project/pull/80488


More information about the Mlir-commits mailing list