[all-commits] [llvm/llvm-project] c6a91e: [Clang][OpenMP] Monotonic does not apply to SIMD

huntergr-arm via All-commits all-commits at lists.llvm.org
Tue Jun 22 02:24:59 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c6a91ee6aaaacbda0c37973112b2e0d609c82321
      https://github.com/llvm/llvm-project/commit/c6a91ee6aaaacbda0c37973112b2e0d609c82321
  Author: Graham Hunter <graham.hunter at arm.com>
  Date:   2021-06-22 (Tue, 22 Jun 2021)

  Changed paths:
    M clang/lib/CodeGen/CGStmtOpenMP.cpp
    M clang/lib/CodeGen/CodeGenFunction.h
    M clang/test/OpenMP/distribute_parallel_for_simd_codegen.cpp
    M clang/test/OpenMP/distribute_simd_codegen.cpp
    M clang/test/OpenMP/for_simd_codegen.cpp
    M clang/test/OpenMP/parallel_for_simd_codegen.cpp
    M clang/test/OpenMP/schedule_codegen.cpp
    M clang/test/OpenMP/target_parallel_for_simd_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_schedule_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_simd_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_simd_dist_schedule_codegen.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_simd_schedule_codegen.cpp
    M clang/test/OpenMP/teams_distribute_simd_codegen.cpp
    M clang/test/OpenMP/teams_distribute_simd_dist_schedule_codegen.cpp

  Log Message:
  -----------
  [Clang][OpenMP] Monotonic does not apply to SIMD

The codegen for simd constructs was affected by the presence (or
absence) of the 'monotonic' schedule modifier for worksharing
loops. The modifier is only intended to apply to the scheduling of
chunks for a thread, not iterations of a loop inside a chunk.

In addition, the monotonic modifier was applied to worksharing loops
by default if no schedule clause was present; the referenced part of
the OpenMP 4.5 spec in the code (section 2.7.1) only applies if the
user specified a schedule clause with a static kind but no modifier.
Without a user-specified schedule clause we should default to
nonmonotonic scheduling.

Reviewed By: ABataev

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




More information about the All-commits mailing list