[all-commits] [llvm/llvm-project] 4782a4: [OpenMP] Fix calculation of dependencies for multi...

Joachim via All-commits all-commits at lists.llvm.org
Wed Jul 17 22:42:02 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4782a4ab0ad43b2f47f20afbe025b841d7f0ac04
      https://github.com/llvm/llvm-project/commit/4782a4ab0ad43b2f47f20afbe025b841d7f0ac04
  Author: Joachim <jenke at itc.rwth-aachen.de>
  Date:   2024-07-18 (Thu, 18 Jul 2024)

  Changed paths:
    M clang/lib/CodeGen/CGOpenMPRuntime.cpp
    M clang/test/OpenMP/depend_iterator_bug.c
    M clang/test/OpenMP/task_codegen.c

  Log Message:
  -----------
  [OpenMP] Fix calculation of dependencies for multi-dimensional iteration space (#99347)

The expectation for multiple iterators used in a single depend clause
(`depend(iterator(i=0:5,j=0:5), in:x[i][j])`) is that the iterator space
is the product of the iteration vectors (25 in that case). The current
codeGen only works correctly, if `numIterators() = 1`. For more
iterators, the execution results in runtime assertions or segfaults.
The modified codeGen first calculates the iteration space, then
multiplies to the number of dependencies in the depend clause and
finally adds to the total number of iterator dependencies.



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