[all-commits] [llvm/llvm-project] e17d86: [flang][OpenMP][Lower] lower array subscripts for ...

Tom Eccles via All-commits all-commits at lists.llvm.org
Tue Apr 1 02:26:36 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e17d864f55133d46e12614280951ddb2dc43cc74
      https://github.com/llvm/llvm-project/commit/e17d864f55133d46e12614280951ddb2dc43cc74
  Author: Tom Eccles <tom.eccles at arm.com>
  Date:   2025-04-01 (Tue, 01 Apr 2025)

  Changed paths:
    M flang/lib/Lower/OpenMP/ClauseProcessor.cpp
    M flang/lib/Lower/OpenMP/ClauseProcessor.h
    M flang/lib/Lower/OpenMP/OpenMP.cpp
    A flang/test/Lower/OpenMP/Todo/depend-clause-vector-subscript-array-section.f90
    M flang/test/Lower/OpenMP/target.f90
    A flang/test/Lower/OpenMP/task-depend-array-section.f90
    M flang/test/Lower/OpenMP/task.f90

  Log Message:
  -----------
  [flang][OpenMP][Lower] lower array subscripts for task depend (#132994)

The OpenMP standard says that all dependencies in the same set of
inter-dependent tasks must be non-overlapping. This simplification means
that the OpenMP only needs to keep track of the base addresses of
dependency variables. This can be seen in kmp_taskdeps.cpp, which stores
task dependency information in a hash table, using the base address as a
key.

This patch generates a rebox operation to slice boxed arrays, but only
the box data address is used for the task dependency. The extra box is
optimized away by LLVM at O3.

Vector subscripts are TODO (I will address in my next patch).

This also fixes a bug for ordinary subscripts when the symbol was mapped
to a box:

Fixes #132647



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