[all-commits] [llvm/llvm-project] ad23e4: [Libomptarget] Implement a unified kernel entry fu...

Joseph Huber via All-commits all-commits at lists.llvm.org
Fri Jul 8 11:44:41 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ad23e4d85fb39e99ff61f588bad480b824d9d1df
      https://github.com/llvm/llvm-project/commit/ad23e4d85fb39e99ff61f588bad480b824d9d1df
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2022-07-08 (Fri, 08 Jul 2022)

  Changed paths:
    M openmp/libomptarget/include/omptarget.h
    M openmp/libomptarget/src/exports
    M openmp/libomptarget/src/interface.cpp

  Log Message:
  -----------
  [Libomptarget] Implement a unified kernel entry function

This patch implements a unified kernel entry function that will be
targeted from both teams and non-teams clauses. We introduce a new
interface and make the old functions call in using the new one. A
following patch will include the necessary changes to Clang to call
these new functions instead.

Reviewed By: jdoerfert

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


  Commit: 1fff116645b3ee108e8d8edbd5b90bed8304a4a8
      https://github.com/llvm/llvm-project/commit/1fff116645b3ee108e8d8edbd5b90bed8304a4a8
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2022-07-08 (Fri, 08 Jul 2022)

  Changed paths:
    M clang/lib/CodeGen/CGOpenMPRuntime.cpp
    M clang/test/OpenMP/capturing_in_templates.cpp
    M clang/test/OpenMP/declare_mapper_codegen.cpp
    M clang/test/OpenMP/declare_target_link_codegen.cpp
    M clang/test/OpenMP/distribute_codegen.cpp
    M clang/test/OpenMP/distribute_firstprivate_codegen.cpp
    M clang/test/OpenMP/distribute_lastprivate_codegen.cpp
    M clang/test/OpenMP/distribute_parallel_for_codegen.cpp
    M clang/test/OpenMP/distribute_parallel_for_firstprivate_codegen.cpp
    M clang/test/OpenMP/distribute_parallel_for_if_codegen.cpp
    M clang/test/OpenMP/distribute_parallel_for_lastprivate_codegen.cpp
    M clang/test/OpenMP/distribute_parallel_for_num_threads_codegen.cpp
    M clang/test/OpenMP/distribute_parallel_for_private_codegen.cpp
    M clang/test/OpenMP/distribute_parallel_for_proc_bind_codegen.cpp
    M clang/test/OpenMP/distribute_parallel_for_reduction_codegen.cpp
    M clang/test/OpenMP/distribute_parallel_for_simd_codegen.cpp
    M clang/test/OpenMP/distribute_parallel_for_simd_firstprivate_codegen.cpp
    M clang/test/OpenMP/distribute_parallel_for_simd_if_codegen.cpp
    M clang/test/OpenMP/distribute_parallel_for_simd_lastprivate_codegen.cpp
    M clang/test/OpenMP/distribute_parallel_for_simd_num_threads_codegen.cpp
    M clang/test/OpenMP/distribute_parallel_for_simd_private_codegen.cpp
    M clang/test/OpenMP/distribute_parallel_for_simd_proc_bind_codegen.cpp
    M clang/test/OpenMP/distribute_private_codegen.cpp
    M clang/test/OpenMP/distribute_simd_codegen.cpp
    M clang/test/OpenMP/distribute_simd_firstprivate_codegen.cpp
    M clang/test/OpenMP/distribute_simd_lastprivate_codegen.cpp
    M clang/test/OpenMP/distribute_simd_private_codegen.cpp
    M clang/test/OpenMP/distribute_simd_reduction_codegen.cpp
    M clang/test/OpenMP/nvptx_lambda_capturing.cpp
    M clang/test/OpenMP/nvptx_lambda_pointer_capturing.cpp
    M clang/test/OpenMP/nvptx_target_requires_unified_shared_memory.cpp
    M clang/test/OpenMP/openmp_offload_codegen.cpp
    M clang/test/OpenMP/reduction_implicit_map.cpp
    M clang/test/OpenMP/target_codegen.cpp
    M clang/test/OpenMP/target_codegen_global_capture.cpp
    M clang/test/OpenMP/target_data_member_codegen.cpp
    M clang/test/OpenMP/target_data_use_device_ptr_if_codegen.cpp
    M clang/test/OpenMP/target_defaultmap_codegen_01.cpp
    M clang/test/OpenMP/target_defaultmap_codegen_02.cpp
    M clang/test/OpenMP/target_depend_codegen.cpp
    M clang/test/OpenMP/target_device_codegen.cpp
    M clang/test/OpenMP/target_firstprivate_codegen.cpp
    M clang/test/OpenMP/target_is_device_ptr_codegen.cpp
    M clang/test/OpenMP/target_map_codegen_00.cpp
    M clang/test/OpenMP/target_map_codegen_01.cpp
    M clang/test/OpenMP/target_map_codegen_02.cpp
    M clang/test/OpenMP/target_map_codegen_03.cpp
    M clang/test/OpenMP/target_map_codegen_04.cpp
    M clang/test/OpenMP/target_map_codegen_05.cpp
    M clang/test/OpenMP/target_map_codegen_06.cpp
    M clang/test/OpenMP/target_map_codegen_07.cpp
    M clang/test/OpenMP/target_map_codegen_08.cpp
    M clang/test/OpenMP/target_map_codegen_09.cpp
    M clang/test/OpenMP/target_map_codegen_10.cpp
    M clang/test/OpenMP/target_map_codegen_11.cpp
    M clang/test/OpenMP/target_map_codegen_12.cpp
    M clang/test/OpenMP/target_map_codegen_13.cpp
    M clang/test/OpenMP/target_map_codegen_14.cpp
    M clang/test/OpenMP/target_map_codegen_15.cpp
    M clang/test/OpenMP/target_map_codegen_16.cpp
    M clang/test/OpenMP/target_map_codegen_17.cpp
    M clang/test/OpenMP/target_map_codegen_18.inc
    M clang/test/OpenMP/target_map_codegen_19.cpp
    M clang/test/OpenMP/target_map_codegen_20.cpp
    M clang/test/OpenMP/target_map_codegen_21.cpp
    M clang/test/OpenMP/target_map_codegen_22.cpp
    M clang/test/OpenMP/target_map_codegen_23.cpp
    M clang/test/OpenMP/target_map_codegen_24.cpp
    M clang/test/OpenMP/target_map_codegen_25.cpp
    M clang/test/OpenMP/target_map_codegen_26.cpp
    M clang/test/OpenMP/target_map_codegen_27.cpp
    M clang/test/OpenMP/target_map_codegen_28.cpp
    M clang/test/OpenMP/target_map_codegen_29.cpp
    M clang/test/OpenMP/target_map_codegen_30.cpp
    M clang/test/OpenMP/target_map_codegen_31.cpp
    M clang/test/OpenMP/target_map_codegen_32.cpp
    M clang/test/OpenMP/target_map_codegen_33.cpp
    M clang/test/OpenMP/target_map_codegen_34.cpp
    M clang/test/OpenMP/target_map_codegen_35.cpp
    M clang/test/OpenMP/target_map_codegen_hold.cpp
    M clang/test/OpenMP/target_map_names.cpp
    M clang/test/OpenMP/target_map_names_attr.cpp
    M clang/test/OpenMP/target_offload_mandatory_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_depend_codegen.cpp
    M clang/test/OpenMP/target_parallel_for_simd_codegen.cpp
    M clang/test/OpenMP/target_parallel_for_simd_depend_codegen.cpp
    M clang/test/OpenMP/target_parallel_for_simd_uses_allocators_codegen.cpp
    M clang/test/OpenMP/target_parallel_for_uses_allocators_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_parallel_uses_allocators_codegen.cpp
    M clang/test/OpenMP/target_simd_codegen.cpp
    M clang/test/OpenMP/target_simd_depend_codegen.cpp
    M clang/test/OpenMP/target_simd_uses_allocators_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_collapse_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_depend_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_dist_schedule_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_firstprivate_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_lastprivate_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_collapse_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_depend_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_dist_schedule_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_firstprivate_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_if_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_lastprivate_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_order_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_private_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_proc_bind_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_reduction_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_schedule_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_simd_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_simd_collapse_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_simd_depend_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_simd_dist_schedule_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_simd_firstprivate_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_simd_if_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_simd_lastprivate_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_simd_private_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_simd_proc_bind_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_simd_reduction_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_simd_schedule_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_simd_uses_allocators_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_uses_allocators_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_private_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_reduction_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_simd_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_simd_collapse_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_simd_depend_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_simd_dist_schedule_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_simd_firstprivate_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_simd_lastprivate_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_simd_private_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_simd_reduction_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_simd_uses_allocators_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_uses_allocators_codegen.cpp
    M clang/test/OpenMP/target_teams_map_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/target_teams_uses_allocators_codegen.cpp
    M clang/test/OpenMP/target_uses_allocators_codegen.cpp
    M clang/test/OpenMP/teams_codegen.cpp
    M clang/test/OpenMP/teams_distribute_codegen.cpp
    M clang/test/OpenMP/teams_distribute_collapse_codegen.cpp
    M clang/test/OpenMP/teams_distribute_dist_schedule_codegen.cpp
    M clang/test/OpenMP/teams_distribute_firstprivate_codegen.cpp
    M clang/test/OpenMP/teams_distribute_lastprivate_codegen.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_codegen.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_collapse_codegen.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_copyin_codegen.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_dist_schedule_codegen.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_firstprivate_codegen.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_if_codegen.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_lastprivate_codegen.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_num_threads_codegen.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_private_codegen.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_proc_bind_codegen.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_reduction_codegen.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_schedule_codegen.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_simd_codegen.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_simd_collapse_codegen.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_simd_dist_schedule_codegen.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_simd_firstprivate_codegen.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_simd_if_codegen.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_simd_lastprivate_codegen.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_simd_num_threads_codegen.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_simd_private_codegen.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_simd_proc_bind_codegen.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_simd_reduction_codegen.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_simd_schedule_codegen.cpp
    M clang/test/OpenMP/teams_distribute_private_codegen.cpp
    M clang/test/OpenMP/teams_distribute_reduction_codegen.cpp
    M clang/test/OpenMP/teams_distribute_simd_codegen.cpp
    M clang/test/OpenMP/teams_distribute_simd_collapse_codegen.cpp
    M clang/test/OpenMP/teams_distribute_simd_dist_schedule_codegen.cpp
    M clang/test/OpenMP/teams_distribute_simd_firstprivate_codegen.cpp
    M clang/test/OpenMP/teams_distribute_simd_lastprivate_codegen.cpp
    M clang/test/OpenMP/teams_distribute_simd_private_codegen.cpp
    M clang/test/OpenMP/teams_distribute_simd_reduction_codegen.cpp
    M clang/test/OpenMP/teams_firstprivate_codegen.cpp
    M clang/test/OpenMP/teams_private_codegen.cpp
    M llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
    M llvm/include/llvm/Frontend/OpenMP/OMPKinds.def
    M llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp

  Log Message:
  -----------
  [OpenMP] Change OpenMP code generation for target region entries

This patch changes the code we generate to enter a target region on the
device. This is in-line with the new definition in the runtime that was
added previously. Additionally we implement this in the OpenMPIRBuilder
so that this code can be shared with Flang in the future.

Reviewed By: ABataev

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


  Commit: 5300263c70da4b3a56726ad031da004e8ce8004f
      https://github.com/llvm/llvm-project/commit/5300263c70da4b3a56726ad031da004e8ce8004f
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2022-07-08 (Fri, 08 Jul 2022)

  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_firstprivate_codegen.cpp
    M clang/test/OpenMP/distribute_lastprivate_codegen.cpp
    M clang/test/OpenMP/distribute_parallel_for_codegen.cpp
    M clang/test/OpenMP/distribute_parallel_for_firstprivate_codegen.cpp
    M clang/test/OpenMP/distribute_parallel_for_if_codegen.cpp
    M clang/test/OpenMP/distribute_parallel_for_lastprivate_codegen.cpp
    M clang/test/OpenMP/distribute_parallel_for_num_threads_codegen.cpp
    M clang/test/OpenMP/distribute_parallel_for_private_codegen.cpp
    M clang/test/OpenMP/distribute_parallel_for_proc_bind_codegen.cpp
    M clang/test/OpenMP/distribute_parallel_for_simd_codegen.cpp
    M clang/test/OpenMP/distribute_parallel_for_simd_firstprivate_codegen.cpp
    M clang/test/OpenMP/distribute_parallel_for_simd_if_codegen.cpp
    M clang/test/OpenMP/distribute_parallel_for_simd_lastprivate_codegen.cpp
    M clang/test/OpenMP/distribute_parallel_for_simd_num_threads_codegen.cpp
    M clang/test/OpenMP/distribute_parallel_for_simd_private_codegen.cpp
    M clang/test/OpenMP/distribute_parallel_for_simd_proc_bind_codegen.cpp
    M clang/test/OpenMP/distribute_private_codegen.cpp
    M clang/test/OpenMP/distribute_simd_codegen.cpp
    M clang/test/OpenMP/distribute_simd_firstprivate_codegen.cpp
    M clang/test/OpenMP/distribute_simd_lastprivate_codegen.cpp
    M clang/test/OpenMP/distribute_simd_private_codegen.cpp
    M clang/test/OpenMP/distribute_simd_reduction_codegen.cpp
    M clang/test/OpenMP/nvptx_lambda_capturing.cpp
    M clang/test/OpenMP/reduction_implicit_map.cpp
    M clang/test/OpenMP/target_codegen_global_capture.cpp
    M clang/test/OpenMP/target_map_codegen_03.cpp
    M clang/test/OpenMP/target_map_codegen_hold.cpp
    M clang/test/OpenMP/target_offload_mandatory_codegen.cpp
    M clang/test/OpenMP/target_parallel_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_teams_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_collapse_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_dist_schedule_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_firstprivate_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_lastprivate_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_collapse_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_dist_schedule_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_firstprivate_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_if_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_lastprivate_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_order_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_private_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_proc_bind_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_reduction_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_schedule_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_simd_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_simd_collapse_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_simd_dist_schedule_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_simd_firstprivate_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_simd_if_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_simd_lastprivate_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_simd_private_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_simd_proc_bind_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_simd_reduction_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_simd_schedule_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_private_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_reduction_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_simd_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_simd_collapse_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_simd_dist_schedule_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_simd_firstprivate_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_simd_lastprivate_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_simd_private_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_simd_reduction_codegen.cpp
    M clang/test/OpenMP/target_teams_map_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/teams_codegen.cpp
    M clang/test/OpenMP/teams_distribute_codegen.cpp
    M clang/test/OpenMP/teams_distribute_collapse_codegen.cpp
    M clang/test/OpenMP/teams_distribute_dist_schedule_codegen.cpp
    M clang/test/OpenMP/teams_distribute_firstprivate_codegen.cpp
    M clang/test/OpenMP/teams_distribute_lastprivate_codegen.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_codegen.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_collapse_codegen.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_copyin_codegen.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_dist_schedule_codegen.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_firstprivate_codegen.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_if_codegen.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_lastprivate_codegen.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_num_threads_codegen.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_private_codegen.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_proc_bind_codegen.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_reduction_codegen.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_schedule_codegen.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_simd_codegen.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_simd_collapse_codegen.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_simd_dist_schedule_codegen.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_simd_firstprivate_codegen.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_simd_if_codegen.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_simd_lastprivate_codegen.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_simd_num_threads_codegen.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_simd_private_codegen.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_simd_proc_bind_codegen.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_simd_reduction_codegen.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_simd_schedule_codegen.cpp
    M clang/test/OpenMP/teams_distribute_private_codegen.cpp
    M clang/test/OpenMP/teams_distribute_reduction_codegen.cpp
    M clang/test/OpenMP/teams_distribute_simd_codegen.cpp
    M clang/test/OpenMP/teams_distribute_simd_collapse_codegen.cpp
    M clang/test/OpenMP/teams_distribute_simd_dist_schedule_codegen.cpp
    M clang/test/OpenMP/teams_distribute_simd_firstprivate_codegen.cpp
    M clang/test/OpenMP/teams_distribute_simd_lastprivate_codegen.cpp
    M clang/test/OpenMP/teams_distribute_simd_private_codegen.cpp
    M clang/test/OpenMP/teams_distribute_simd_reduction_codegen.cpp
    M clang/test/OpenMP/teams_firstprivate_codegen.cpp
    M clang/test/OpenMP/teams_private_codegen.cpp
    M llvm/include/llvm/Frontend/OpenMP/OMPKinds.def

  Log Message:
  -----------
  [OpenMP] Add loop tripcount argument to kernel launch and remove push function

Previously we added the `push_target_tripcount` function to send the
loop tripcount to the device runtime so we knew how to configure the
teams / threads for execute the loop for a teams distribute construct.
This was implemented as a separate function mostly to avoid changing the
interface for backwards compatbility. Now that we've changed it anyway
and the new interface can take an arbitrary number of arguments via the
struct without changing the ABI, we can move this to the new interface.
This will simplify the runtime by removing unnecessary state between
calls.

Depends on D128550

Reviewed By: jdoerfert

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


  Commit: c9353eb4bcf8180446d8401796527fe7790ba23c
      https://github.com/llvm/llvm-project/commit/c9353eb4bcf8180446d8401796527fe7790ba23c
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2022-07-08 (Fri, 08 Jul 2022)

  Changed paths:
    M openmp/libomptarget/include/omptarget.h
    M openmp/libomptarget/src/interface.cpp
    M openmp/libomptarget/src/omptarget.cpp
    M openmp/libomptarget/src/private.h
    M openmp/libomptarget/src/rtl.cpp

  Log Message:
  -----------
  [Libomptarget] Use new tripcount argument in the runtime.

The previous patch added an argument to the `__tgt_target_kernel`
runtime function which includes the tripcount used for the loop clause.
This was originally passed in via the `__kmpc_push_target_tripcount`
function. Now we move this logic to the kernel launch itself and remove
the need for the push function.

Depends on D128816

Reviewed By: jdoerfert

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


  Commit: 269d5c16bca15e5f3618ae0b91f907c89eaedf19
      https://github.com/llvm/llvm-project/commit/269d5c16bca15e5f3618ae0b91f907c89eaedf19
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2022-07-08 (Fri, 08 Jul 2022)

  Changed paths:
    M openmp/libomptarget/include/omptarget.h
    M openmp/libomptarget/src/CMakeLists.txt
    A openmp/libomptarget/src/LegacyAPI.cpp
    M openmp/libomptarget/src/interface.cpp

  Log Message:
  -----------
  [Libomptarget][NFC] Move legacy functions to a separate file

This patch moves the old legacy interfaces into `libomptarget` to a
separate file. These do not need to be included anywhere and are simply
provided for backwards compatibility with the ABI. This cleans up the
interface greatly.

Depends on D128817

Reviewed By: JonChesterfield

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


Compare: https://github.com/llvm/llvm-project/compare/46e984b0bf83...269d5c16bca1


More information about the All-commits mailing list