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

Kareem Ergawy via All-commits all-commits at lists.llvm.org
Thu Mar 13 22:06:14 PDT 2025


  Branch: refs/heads/users/ergawy/try_to_fix_nested_target_conversion_2
  Home:   https://github.com/llvm/llvm-project
  Commit: 76ef2e93c902ca430879b29161fd2b572f68e643
      https://github.com/llvm/llvm-project/commit/76ef2e93c902ca430879b29161fd2b572f68e643
  Author: ergawy <kareem.ergawy at amd.com>
  Date:   2025-03-14 (Fri, 14 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: 1d25221b1079cbf4603cb14f10f73eda51840735
      https://github.com/llvm/llvm-project/commit/1d25221b1079cbf4603cb14f10f73eda51840735
  Author: ergawy <kareem.ergawy at amd.com>
  Date:   2025-03-14 (Fri, 14 Mar 2025)

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

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


  Commit: 1c8a6b67bbe32395e50253175bbd05aa4c84c54a
      https://github.com/llvm/llvm-project/commit/1c8a6b67bbe32395e50253175bbd05aa4c84c54a
  Author: ergawy <kareem.ergawy at amd.com>
  Date:   2025-03-14 (Fri, 14 Mar 2025)

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

  Log Message:
  -----------
  update docs


  Commit: 714bac23b15173b2fc6fade05c6f5cc53b87cff0
      https://github.com/llvm/llvm-project/commit/714bac23b15173b2fc6fade05c6f5cc53b87cff0
  Author: ergawy <kareem.ergawy at amd.com>
  Date:   2025-03-14 (Fri, 14 Mar 2025)

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

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


Compare: https://github.com/llvm/llvm-project/compare/3480c759059c...714bac23b151

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