[all-commits] [llvm/llvm-project] 76e6c8: Codegen changes for strict modifier with grainsize...

CHANDRA GHALE via All-commits all-commits at lists.llvm.org
Thu Nov 28 00:49:21 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 76e6c8d3fc3dc097a3bd96e8959f73a809493976
      https://github.com/llvm/llvm-project/commit/76e6c8d3fc3dc097a3bd96e8959f73a809493976
  Author: CHANDRA GHALE <chandra.nitdgp at gmail.com>
  Date:   2024-11-28 (Thu, 28 Nov 2024)

  Changed paths:
    M clang/lib/CodeGen/CGOpenMPRuntime.cpp
    M clang/lib/CodeGen/CGOpenMPRuntime.h
    M clang/lib/CodeGen/CGStmtOpenMP.cpp
    A clang/test/OpenMP/taskloop_strictmodifier_codegen.cpp
    M llvm/include/llvm/Frontend/OpenMP/OMPKinds.def

  Log Message:
  -----------
  Codegen changes for strict modifier with grainsize/num_tasks of taskloop construct (#117196)

Initial parsing/sema for 'strict' modifier with 'num_tasks' and
‘grainsize’ clause is present in these commits
[grainsize_parsing](https://github.com/llvm/llvm-project/commit/ab9eac762c35068e77f57795e660d06f578c9614)
and
[num_tasks_parsing](https://github.com/llvm/llvm-project/commit/56c166017055595a9f26933e85bfd89e30c528d0#diff-4184486638e85284c3a2c961a81e7752231022daf97e411007c13a6732b50db9R6545)
. However, this implementation appears incomplete as it lacks code
generation support. A runtime patch was introduced in this runtime
commit
[runtime_patch](https://github.com/llvm/llvm-project/commit/540007b42701b5ac9adba076824bfd648a265413#diff-5e95f9319910d6965d09c301359dbe6b23f3eef5ce4d262ef2c2d2137875b5c4R374)
, which adds a new API, _kmpc_taskloop_5, to accommodate the strict
modifier. 
In this patch I have added codegen support. When the strict modifier is
present alongside the grainsize or num_tasks clauses of taskloop
construct, the code now emits a call to _kmpc_taskloop_5, which includes
an additional parameter of type i32 with the value 1 to indicate the
strict modifier. If the strict modifier is not present, it falls back to
the existing _kmpc_taskloop API call.

---------

Co-authored-by: Chandra Ghale <ghale at pe31.hpc.amslabs.hpecorp.net>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list