[PATCH] D51331: [OPENMP] Create non-const ident_t structs.

Mike Rice via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 27 16:52:13 PDT 2018


mikerice created this revision.
mikerice added a reviewer: ABataev.
Herald added subscribers: jfb, guansong.

ITT Notify in the OpenMP runtime uses (and writes to) the reserved_2 field in the ident_t struct.  See __kmp_itt_region_forking in openmp/runtime/src/kmp_itt.inl.  Currently clang is creating these structs const and segfaults occur when running with analysis tools using libittnotify.

The proposed change creates the ident_t object non-const and modifies the tests accordingly.


https://reviews.llvm.org/D51331

Files:
  lib/CodeGen/CGOpenMPRuntime.cpp
  test/OpenMP/distribute_codegen.cpp
  test/OpenMP/distribute_parallel_for_num_threads_codegen.cpp
  test/OpenMP/distribute_parallel_for_proc_bind_codegen.cpp
  test/OpenMP/distribute_parallel_for_simd_num_threads_codegen.cpp
  test/OpenMP/distribute_parallel_for_simd_proc_bind_codegen.cpp
  test/OpenMP/distribute_simd_codegen.cpp
  test/OpenMP/for_codegen.cpp
  test/OpenMP/for_firstprivate_codegen.cpp
  test/OpenMP/for_lastprivate_codegen.cpp
  test/OpenMP/for_linear_codegen.cpp
  test/OpenMP/for_reduction_codegen.cpp
  test/OpenMP/for_reduction_codegen_UDR.cpp
  test/OpenMP/ordered_codegen.cpp
  test/OpenMP/parallel_codegen.cpp
  test/OpenMP/parallel_copyin_codegen.cpp
  test/OpenMP/parallel_for_codegen.cpp
  test/OpenMP/parallel_num_threads_codegen.cpp
  test/OpenMP/parallel_proc_bind_codegen.cpp
  test/OpenMP/parallel_reduction_codegen.cpp
  test/OpenMP/sections_codegen.cpp
  test/OpenMP/sections_firstprivate_codegen.cpp
  test/OpenMP/sections_lastprivate_codegen.cpp
  test/OpenMP/sections_reduction_codegen.cpp
  test/OpenMP/single_codegen.cpp
  test/OpenMP/single_firstprivate_codegen.cpp
  test/OpenMP/target_parallel_codegen.cpp
  test/OpenMP/target_parallel_for_codegen.cpp
  test/OpenMP/target_parallel_for_simd_codegen.cpp
  test/OpenMP/target_parallel_if_codegen.cpp
  test/OpenMP/target_parallel_num_threads_codegen.cpp
  test/OpenMP/target_teams_codegen.cpp
  test/OpenMP/target_teams_distribute_codegen.cpp
  test/OpenMP/target_teams_distribute_parallel_for_proc_bind_codegen.cpp
  test/OpenMP/target_teams_distribute_parallel_for_simd_proc_bind_codegen.cpp
  test/OpenMP/target_teams_distribute_simd_codegen.cpp
  test/OpenMP/target_teams_num_teams_codegen.cpp
  test/OpenMP/target_teams_thread_limit_codegen.cpp
  test/OpenMP/teams_codegen.cpp
  test/OpenMP/teams_distribute_parallel_for_num_threads_codegen.cpp
  test/OpenMP/teams_distribute_parallel_for_proc_bind_codegen.cpp
  test/OpenMP/teams_distribute_parallel_for_simd_num_threads_codegen.cpp
  test/OpenMP/teams_distribute_parallel_for_simd_proc_bind_codegen.cpp
  test/OpenMP/threadprivate_codegen.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51331.162776.patch
Type: text/x-patch
Size: 42968 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180827/338823c1/attachment-0001.bin>


More information about the cfe-commits mailing list