[all-commits] [llvm/llvm-project] de00b7: [Flang][MLIR][OpenMP] Improve use_device_* handling

Sergio Afonso via All-commits all-commits at lists.llvm.org
Thu Apr 24 07:45:00 PDT 2025


  Branch: refs/heads/users/skatrak/map-rework-01-use-device
  Home:   https://github.com/llvm/llvm-project
  Commit: de00b779219bad0a0164fecfc62e8d110df84e97
      https://github.com/llvm/llvm-project/commit/de00b779219bad0a0164fecfc62e8d110df84e97
  Author: Sergio Afonso <safonsof at amd.com>
  Date:   2025-04-24 (Thu, 24 Apr 2025)

  Changed paths:
    M flang/lib/Lower/OpenMP/ClauseProcessor.cpp
    M flang/lib/Lower/OpenMP/Utils.cpp
    M flang/test/Fir/convert-to-llvm-openmp-and-fir.fir
    M flang/test/Lower/OpenMP/target.f90
    M mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
    M mlir/test/Dialect/OpenMP/ops.mlir

  Log Message:
  -----------
  [Flang][MLIR][OpenMP] Improve use_device_* handling

This patch updates MLIR op verifiers for operations taking arguments that must
always be defined by an `omp.map.info` operation to check this requirement.

It also modifies Flang lowering for `use_device_{addr, ptr}`, as well as the
custom MLIR printer and parser for these clauses, to support initializing it to
`OMP_MAP_RETURN_PARAM` and represent this in the MLIR representation as
`return_param`. This internal mapping flag is what eventually is used for
variables passed via these clauses into the target region when translating to
LLVM IR, so making it explicit in Flang and MLIR removes an inconsistency in
the current representation.



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