[all-commits] [llvm/llvm-project] d7e185: [OMPIRBuilder] - Handle dependencies in `createTar...

Pranav Bhandarkar via All-commits all-commits at lists.llvm.org
Mon Jul 22 08:57:06 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d7e185cca98411e82655feecc297906cb7ed0850
      https://github.com/llvm/llvm-project/commit/d7e185cca98411e82655feecc297906cb7ed0850
  Author: Pranav Bhandarkar <pranav.bhandarkar at amd.com>
  Date:   2024-07-22 (Mon, 22 Jul 2024)

  Changed paths:
    M llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
    M llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
    M mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
    A mlir/test/Target/LLVMIR/omptarget-depend.mlir
    A offload/test/offloading/fortran/target-depend.f90

  Log Message:
  -----------
  [OMPIRBuilder] - Handle dependencies in `createTarget` (#93977)

This patch handles dependencies specified by the `depend` clause on an
OpenMP target construct. It does this much the same way clang does it by
materializing an OpenMP `task` that is tagged with the dependencies.

The following functions are relevant to this patch -
1) `createTarget` - This function itself is largely unchanged except
that it now accepts a vector of `DependData` objects that it simply
forwards to `emitTargetCall`
2) `emitTargetCall` - This function has changed now to check if an outer
target-task needs to be materialized (i.e if `target` construct has
`nowait` or has `depend` clause). If yes, it calls `emitTargetTask` to
do all the heavy lifting for creating and dispatching the task.
3) `emitTargetTask` - Bulk of the change is here. See the large comment
explaining what it does at the beginning of this function



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