[Mlir-commits] [llvm] [mlir] [Flang] [OpenMP] Add LLVM lowering support for PRIORITY in TASK (PR #120710)

Thirumalai Shaktivel llvmlistbot at llvm.org
Wed Dec 25 20:35:41 PST 2024


================
@@ -1958,6 +1963,30 @@ OpenMPIRBuilder::InsertPointOrErrorTy OpenMPIRBuilder::createTask(
                            SharedsSize);
     }
 
+    if (Priority) {
+      //
+      // The return type of "__kmpc_omp_task_alloc" is "kmp_task_t *",
+      // we populate the priority information into the "kmp_task_t" here
+      //
+      // The struct "kmp_task_t" definition is available in kmp.h
+      // kmp_task_t = { shareds, routine, part_id, data1, data2 }
+      // data2 is used for priority
+      //
+      Type *Int32Ty = Builder.getInt32Ty();
+      // kmp_task_t* => { ptr }
+      Type *taskPtr = StructType::get(VoidPtr);
----------------
Thirumalai-Shaktivel wrote:

Sure, thanks for the information.

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


More information about the Mlir-commits mailing list