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

Sergio Afonso via All-commits all-commits at lists.llvm.org
Thu May 15 03:23:53 PDT 2025


  Branch: refs/heads/users/skatrak/map-rework-01-use-device
  Home:   https://github.com/llvm/llvm-project
  Commit: 59bc1c921519967d71837a0833023a6dbccf9045
      https://github.com/llvm/llvm-project/commit/59bc1c921519967d71837a0833023a6dbccf9045
  Author: Sergio Afonso <safonsof at amd.com>
  Date:   2025-05-15 (Thu, 15 May 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