[all-commits] [llvm/llvm-project] fa5d22: [OpenMP][NFC] Reuse OMPIRBuilder `struct ident_t` ...

Johannes Doerfert via All-commits all-commits at lists.llvm.org
Mon Aug 10 15:15:35 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: fa5d22a045de543b4df9eb5edfb8d70ce43bd13a
      https://github.com/llvm/llvm-project/commit/fa5d22a045de543b4df9eb5edfb8d70ce43bd13a
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2020-08-10 (Mon, 10 Aug 2020)

  Changed paths:
    M clang/lib/CodeGen/CGOpenMPRuntime.cpp
    M clang/lib/CodeGen/CGOpenMPRuntime.h
    M clang/test/OpenMP/distribute_codegen.cpp
    M clang/test/OpenMP/distribute_parallel_for_num_threads_codegen.cpp
    M clang/test/OpenMP/distribute_parallel_for_proc_bind_codegen.cpp
    M clang/test/OpenMP/distribute_parallel_for_simd_num_threads_codegen.cpp
    M clang/test/OpenMP/distribute_parallel_for_simd_proc_bind_codegen.cpp
    M clang/test/OpenMP/distribute_simd_codegen.cpp
    M clang/test/OpenMP/for_codegen.cpp
    M clang/test/OpenMP/for_firstprivate_codegen.cpp
    M clang/test/OpenMP/for_lastprivate_codegen.cpp
    M clang/test/OpenMP/for_linear_codegen.cpp
    M clang/test/OpenMP/for_reduction_codegen.cpp
    M clang/test/OpenMP/for_reduction_codegen_UDR.cpp
    M clang/test/OpenMP/master_taskloop_in_reduction_codegen.cpp
    M clang/test/OpenMP/master_taskloop_reduction_codegen.cpp
    M clang/test/OpenMP/master_taskloop_simd_in_reduction_codegen.cpp
    M clang/test/OpenMP/master_taskloop_simd_reduction_codegen.cpp
    M clang/test/OpenMP/openmp_win_codegen.cpp
    M clang/test/OpenMP/ordered_codegen.cpp
    M clang/test/OpenMP/parallel_codegen.cpp
    M clang/test/OpenMP/parallel_copyin_codegen.cpp
    M clang/test/OpenMP/parallel_for_codegen.cpp
    M clang/test/OpenMP/parallel_master_codegen.cpp
    M clang/test/OpenMP/parallel_master_taskloop_reduction_codegen.cpp
    M clang/test/OpenMP/parallel_master_taskloop_simd_reduction_codegen.cpp
    M clang/test/OpenMP/parallel_num_threads_codegen.cpp
    M clang/test/OpenMP/parallel_proc_bind_codegen.cpp
    M clang/test/OpenMP/parallel_reduction_codegen.cpp
    M clang/test/OpenMP/sections_codegen.cpp
    M clang/test/OpenMP/sections_firstprivate_codegen.cpp
    M clang/test/OpenMP/sections_lastprivate_codegen.cpp
    M clang/test/OpenMP/sections_reduction_codegen.cpp
    M clang/test/OpenMP/single_codegen.cpp
    M clang/test/OpenMP/single_firstprivate_codegen.cpp
    M clang/test/OpenMP/target_depend_codegen.cpp
    M clang/test/OpenMP/target_parallel_codegen.cpp
    M clang/test/OpenMP/target_parallel_depend_codegen.cpp
    M clang/test/OpenMP/target_parallel_for_codegen.cpp
    M clang/test/OpenMP/target_parallel_for_simd_codegen.cpp
    M clang/test/OpenMP/target_parallel_if_codegen.cpp
    M clang/test/OpenMP/target_parallel_num_threads_codegen.cpp
    M clang/test/OpenMP/target_simd_depend_codegen.cpp
    M clang/test/OpenMP/target_teams_codegen.cpp
    M clang/test/OpenMP/target_teams_depend_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_proc_bind_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_simd_proc_bind_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_simd_codegen.cpp
    M clang/test/OpenMP/target_teams_num_teams_codegen.cpp
    M clang/test/OpenMP/target_teams_thread_limit_codegen.cpp
    M clang/test/OpenMP/task_in_reduction_codegen.cpp
    M clang/test/OpenMP/taskloop_in_reduction_codegen.cpp
    M clang/test/OpenMP/taskloop_reduction_codegen.cpp
    M clang/test/OpenMP/taskloop_simd_in_reduction_codegen.cpp
    M clang/test/OpenMP/taskloop_simd_reduction_codegen.cpp
    M clang/test/OpenMP/teams_codegen.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_num_threads_codegen.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_proc_bind_codegen.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_simd_num_threads_codegen.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_simd_proc_bind_codegen.cpp
    M clang/test/OpenMP/threadprivate_codegen.cpp
    M llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
    M llvm/include/llvm/IR/IRBuilder.h
    M llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
    M llvm/lib/IR/IRBuilder.cpp
    M llvm/test/Transforms/OpenMP/deduplication.ll

  Log Message:
  -----------
  [OpenMP][NFC] Reuse OMPIRBuilder `struct ident_t` handling in Clang

Replace the `ident_t` handling in Clang with the methods offered by the
OMPIRBuilder. This cuts down on the clang code as well as the
differences between the two, making further transitions easier. Tests
have changed but there should not be a real functional change. The most
interesting difference is probably that we stop generating local ident_t
allocations for now and just use globals. Given that this happens only
with debug info, the location part of the `ident_t` is probably bigger
than the test anyway. As the location part is already a global, we can
avoid the allocation, memcpy, and store in favor of a constant global
that is slightly bigger. This can be revisited if there are
complications.

Reviewed By: ABataev

Differential Revision: https://reviews.llvm.org/D80735




More information about the All-commits mailing list