[all-commits] [llvm/llvm-project] 30b094: [Flang][MLIR][OpenMP] Improve use_device_* handlin...

Sergio Afonso via All-commits all-commits at lists.llvm.org
Thu May 15 04:28:28 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 30b0946326354d247a92622f08be4722df58bb55
      https://github.com/llvm/llvm-project/commit/30b0946326354d247a92622f08be4722df58bb55
  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 (#137198)

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