[all-commits] [llvm/llvm-project] 2b6b9c: [flang][OpenMP] Translate OpenMP scopes when compi...

Kareem Ergawy via All-commits all-commits at lists.llvm.org
Tue Mar 11 22:25:31 PDT 2025


  Branch: refs/heads/users/ergawy/try_to_fix_nested_target_conversion_2
  Home:   https://github.com/llvm/llvm-project
  Commit: 2b6b9c1fae4ea33cb4d3056dc016cdcac2cfc304
      https://github.com/llvm/llvm-project/commit/2b6b9c1fae4ea33cb4d3056dc016cdcac2cfc304
  Author: ergawy <kareem.ergawy at amd.com>
  Date:   2025-03-12 (Wed, 12 Mar 2025)

  Changed paths:
    M mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
    A mlir/test/Target/LLVMIR/openmp-target-nesting-in-host-ops.mlir

  Log Message:
  -----------
  [flang][OpenMP] Translate OpenMP scopes when compiling for target device

If a `target` directive is nested in a host OpenMP directive (e.g.
parallel, task, or a worksharing loop), flang currently crashes if the
target directive-related MLIR ops (e.g. `omp.map.bounds` and
`omp.map.info` depends on SSA values defined inside the parent host
OpenMP directives/ops.

This PR tries to solve this problem by treating these parent OpenMP ops
as "SSA scopes". Whenever we are translating for the device, instead of
completely translating host ops, we just tranlate their MLIR ops as pure
SSA values.


  Commit: bdd5e156a7bfd7633c8e61d9dbbca400569d028b
      https://github.com/llvm/llvm-project/commit/bdd5e156a7bfd7633c8e61d9dbbca400569d028b
  Author: ergawy <kareem.ergawy at amd.com>
  Date:   2025-03-12 (Wed, 12 Mar 2025)

  Changed paths:
    M mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp

  Log Message:
  -----------
  handle some review comments


Compare: https://github.com/llvm/llvm-project/compare/bf94aebe49e2...bdd5e156a7bf

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