[OPENMP] Emit sizes/init ptrs etc. data for task reductions before
authorAlexey Bataev <a.bataev@hotmail.com>
Thu, 8 Mar 2018 15:24:08 +0000 (15:24 +0000)
committerAlexey Bataev <a.bataev@hotmail.com>
Thu, 8 Mar 2018 15:24:08 +0000 (15:24 +0000)
commit2e0cbe509242697caec4a119b323475c4d006486
treed002b306911ee4a3a6bf2c636f784d19a44e907f
parent93176a813a92542586356092a7a44e60196a390b
[OPENMP] Emit sizes/init ptrs etc. data for task reductions before
using.

We may emit the code in wrong order because of incorrect implementation
of the runtime functions for task reductions. Threadprivate storages may
be initialized after real initialization of the reduction items. Patch
fixes this problem.

llvm-svn: 327008
clang/lib/CodeGen/CGStmtOpenMP.cpp
clang/test/OpenMP/task_in_reduction_codegen.cpp
clang/test/OpenMP/taskloop_reduction_codegen.cpp