[PATCH] [OPENMP] Codegen for the 'omp for' with static schedule (non-chunked).

Alexander Musman alexander.musman at gmail.com
Mon Oct 20 01:02:59 PDT 2014


Hi doug.gregor, hfinkel, rjmccall, rsmith, fraggamuffin, ABataev,

Please review the first patch with codegen of the 'omp for' directive. It implements the simplest case, which is used when no chunk_size is specified in the schedule(static) or no 'schedule' clause is specified - the iteration space is divided by the library into chunks that are approximately equal in size, and at most one chunk is distributed to each thread. In this case, we do not need an outer loop in each thread - each thread requests once which iterations range it should handle (using __kmpc_for_static_init runtime call) and then runs the inner loop on this range.

http://reviews.llvm.org/D5865

Files:
  include/clang/AST/StmtOpenMP.h
  lib/AST/Stmt.cpp
  lib/CodeGen/CGOpenMPRuntime.cpp
  lib/CodeGen/CGOpenMPRuntime.h
  lib/CodeGen/CGStmtOpenMP.cpp
  lib/CodeGen/CodeGenFunction.h
  lib/Sema/SemaOpenMP.cpp
  lib/Serialization/ASTReaderStmt.cpp
  lib/Serialization/ASTWriterStmt.cpp
  test/OpenMP/for_codegen.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5865.15135.patch
Type: text/x-patch
Size: 63907 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20141020/bdd3218e/attachment.bin>


More information about the cfe-commits mailing list