[PATCH] [OPENMP] Loop collapsing and initial codegen for 'omp simd' directive

Alexander Musman alexander.musman at gmail.com
Tue Sep 30 04:59:56 PDT 2014


Hal,

I updated the code to make the number of iterations 64-bit if we cannot prove that 32 bits would be enough and added a test with such example.
I'm not sure if it's worth to do widening to 128 bits in similar cases with several nested loops with 64-bit counters - in particular, in case of worksharing loop directives the library only supports 32-bit and 64-bit counters, so we'll need truncate it to 64 bits for such directives anyway.

Regarding 'lastprivate' codegen at: lib/CodeGen/CGStmtOpenMP.cpp:67 -- this will need helper expressions in OMPLastprivateClause (e.g., Copy Constructor to copy from private var to the non-private), this would be better to do in a separate patch.

Thanks,
Alexander

http://reviews.llvm.org/D5184

Files:
  include/clang/AST/Stmt.h
  include/clang/AST/StmtOpenMP.h
  include/clang/Basic/DiagnosticSemaKinds.td
  lib/AST/Stmt.cpp
  lib/CodeGen/CGStmtOpenMP.cpp
  lib/CodeGen/CodeGenFunction.h
  lib/Sema/SemaOpenMP.cpp
  lib/Serialization/ASTReaderStmt.cpp
  lib/Serialization/ASTWriterStmt.cpp
  test/OpenMP/for_loop_messages.cpp
  test/OpenMP/for_simd_loop_messages.cpp
  test/OpenMP/parallel_for_loop_messages.cpp
  test/OpenMP/parallel_for_simd_loop_messages.cpp
  test/OpenMP/simd_codegen.cpp
  test/OpenMP/simd_loop_messages.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5184.14210.patch
Type: text/x-patch
Size: 109251 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140930/28399aec/attachment.bin>


More information about the cfe-commits mailing list