]> granicus.if.org Git - clang/commit
[OPENMP 4.5] Fixed codegen for 'priority' and destructors in task-based
authorAlexey Bataev <a.bataev@hotmail.com>
Mon, 30 May 2016 09:06:50 +0000 (09:06 +0000)
committerAlexey Bataev <a.bataev@hotmail.com>
Mon, 30 May 2016 09:06:50 +0000 (09:06 +0000)
commit60f07699876f3d47de5a158d79426f297c075b67
tree304072bd331a3103c36179e2642a29800de3ee65
parent11a30c85966dbfafd324fa844ec1fc312a77fc86
[OPENMP 4.5] Fixed codegen for 'priority' and destructors in task-based
directives.

'kmp_task_t' record type added a new field for 'priority' clause and
changed the representation of pointer to destructors for privates used
within loop-based directives.
Old representation:

typedef struct kmp_task {                   /* GEH: Shouldn't this be
aligned somehow? */
  void *shareds;                            /**< pointer to block of
    pointers to shared vars   */
  kmp_routine_entry_t routine;              /**< pointer to routine
    to call for executing task */
  kmp_int32 part_id;                        /**< part id for the
    task                          */
  kmp_routine_entry_t destructors;        /* pointer to function to
  invoke deconstructors of firstprivate C++ objects */
  /*  private vars  */
} kmp_task_t;

New representation:

typedef struct kmp_task {                   /* GEH: Shouldn't this be
aligned somehow? */
  void *shareds;                            /**< pointer to block of
    pointers to shared vars   */
  kmp_routine_entry_t routine;              /**< pointer to routine
    to call for executing task */
  kmp_int32 part_id;                        /**< part id for the
    task                          */
  kmp_cmplrdata_t data1; /* Two known
optional additions: destructors and priority */
  kmp_cmplrdata_t data2; /* Process
destructors first, priority second */
/* future data */
  /*  private vars  */
} kmp_task_t;

Also excessive initialization of 'destructors' fields to 'null' was
removed from codegen if it is known that no destructors shal be used.
Currently a special bit is used in 'kmp_tasking_flags_t' bitfields
('destructors_thunk' bitfield).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271201 91177308-0d34-0410-b5e6-96231b3b80d8
14 files changed:
lib/CodeGen/CGOpenMPRuntime.cpp
lib/CodeGen/CGStmtOpenMP.cpp
test/OpenMP/task_codegen.cpp
test/OpenMP/task_firstprivate_codegen.cpp
test/OpenMP/task_if_codegen.cpp
test/OpenMP/task_private_codegen.cpp
test/OpenMP/taskloop_codegen.cpp
test/OpenMP/taskloop_firstprivate_codegen.cpp
test/OpenMP/taskloop_lastprivate_codegen.cpp
test/OpenMP/taskloop_private_codegen.cpp
test/OpenMP/taskloop_simd_codegen.cpp
test/OpenMP/taskloop_simd_firstprivate_codegen.cpp
test/OpenMP/taskloop_simd_lastprivate_codegen.cpp
test/OpenMP/taskloop_simd_private_codegen.cpp