[all-commits] [llvm/llvm-project] e55c85: [Flang][OpenMP] Extend omp requires detection in B...

agozillon via All-commits all-commits at lists.llvm.org
Wed Apr 1 10:48:30 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e55c85341d9f757021b4f31b910d2ad2175f7e6c
      https://github.com/llvm/llvm-project/commit/e55c85341d9f757021b4f31b910d2ad2175f7e6c
  Author: agozillon <Andrew.Gozillon at amd.com>
  Date:   2026-04-01 (Wed, 01 Apr 2026)

  Changed paths:
    M flang/lib/Lower/Bridge.cpp
    A flang/test/Lower/OpenMP/requires-usm.f90

  Log Message:
  -----------
  [Flang][OpenMP] Extend omp requires detection in Bridge.cpp (#188106)

Currently, we do not check the module for requires directives, which
means we'll miss these and not set them on the OpenMP module.

Otherwise, due to the first come first serve method we currently check
the symbols, there is certain formats that would mean the compiler would
miss that a user had specified requires somewhere in the module. This is
partially but not fully avoided by the Semantics layer pushing the
requires on to the top most PFT symbol, as it is entirely possible to
create a legal Fortran program where you could have two or more of these
(e.g. module and main program in one file, standalone funcitons
intermixed with modules or main program). Some examples of this are
shown in the added Fortran test. This PR opts to resolve it by gathering
all of the relevant symbols and processing them.

Also removed gathering from BlockDataUnit as I don't think these symbols
ever get the requires applied.



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