[PATCH] [OPENMP] Initial codegen for 'omp task' directive.
Alexey Bataev
a.bataev at hotmail.com
Wed Feb 11 07:06:27 PST 2015
Hi rjmccall, fraggamuffin, ejstotzer,
The task region is emmitted in several steps:
1. Emit a call to kmp_task_t *__kmpc_omp_task_alloc(ident_t *, kmp_int32 gtid, kmp_int32 flags, size_t sizeof_kmp_task_t, size_t sizeof_shareds, kmp_routine_entry_t *task_entry). Here task_entry is a pointer to the function:
```
kmp_int32 .omp_task_entry.(kmp_int32 gtid, kmp_task_t *tt) {
TaskFunction(gtid, tt->part_id, tt->shareds);
return 0;
}
```
2. Copy a list of shared variables to field shareds of the resulting structure kmp_task_t returned by the previous call (if any).
3. Copy a pointer to destructions function to field destructions of the resulting structure kmp_task_t.
4. Emit a call to kmp_int32 __kmpc_omp_task(ident_t *, kmp_int32 gtid, kmp_task_t *new_task), where new_task is a resulting structure from previous items.
http://reviews.llvm.org/D7560
Files:
lib/CodeGen/CGOpenMPRuntime.cpp
lib/CodeGen/CGOpenMPRuntime.h
lib/CodeGen/CGStmtOpenMP.cpp
lib/Sema/SemaOpenMP.cpp
test/OpenMP/task_codegen.cpp
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7560.19752.patch
Type: text/x-patch
Size: 28838 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150211/a6db237b/attachment.bin>
More information about the cfe-commits
mailing list