[PATCH] [OPENMP] Codegen for 'ordered' directive.

Alexey Bataev a.bataev at hotmail.com
Fri Apr 17 02:06:04 PDT 2015


Hi rjmccall, hfinkel, ejstotzer, fraggamuffin,

Add codegen for 'ordered' directive:
```
__kmpc_ordered(ident_t *, gtid);
<associated statement>;
__kmpc_end_ordered(ident_t *, gtid);
```

Also for 'for' directives with the dynamic scheduling and an 'ordered' clause added a call to '__kmpc_dispatch_fini_(4|8)[u]()' function after increment expression for loop control variable:
```
while(__kmpc_dispatch_next(&LB, &UB)) {
  idx = LB;
  while (idx <= UB) { BODY; ++idx;
  __kmpc_dispatch_fini_(4|8)[u](); // For ordered loops only.
  } // inner loop
}
```

http://reviews.llvm.org/D9070

Files:
  lib/CodeGen/CGOpenMPRuntime.cpp
  lib/CodeGen/CGOpenMPRuntime.h
  lib/CodeGen/CGStmtOpenMP.cpp
  lib/CodeGen/CodeGenFunction.h
  test/OpenMP/ordered_codegen.cpp

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D9070.23898.patch
Type: text/x-patch
Size: 25965 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150417/27942bbc/attachment.bin>


More information about the cfe-commits mailing list