]> granicus.if.org Git - clang/commit
[OPENMP] Codegen for 'ordered' directive.
authorAlexey Bataev <a.bataev@hotmail.com>
Wed, 22 Apr 2015 11:15:40 +0000 (11:15 +0000)
committerAlexey Bataev <a.bataev@hotmail.com>
Wed, 22 Apr 2015 11:15:40 +0000 (11:15 +0000)
commitb3a8f2f537216815d7e34e4a8f1de279b11a4e47
treeeca9e4cee3db298b6bd94839fb904d1674a181c2
parentfda111fa4064ad249e9a9dfc8989c5d7f85179b6
[OPENMP] Codegen for 'ordered' directive.

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
}
Differential Revision: http://reviews.llvm.org/D9070

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235496 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGOpenMPRuntime.cpp
lib/CodeGen/CGOpenMPRuntime.h
lib/CodeGen/CGStmtOpenMP.cpp
lib/CodeGen/CodeGenFunction.h
test/OpenMP/ordered_codegen.cpp [new file with mode: 0644]