[all-commits] [llvm/llvm-project] f5e50b: [OpenMP] Optimized trivial multiple edges from tas...

Joachim via All-commits all-commits at lists.llvm.org
Tue Nov 21 09:39:26 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f5e50b21da0cb543064b2d0b9304ce0b368cf2bb
      https://github.com/llvm/llvm-project/commit/f5e50b21da0cb543064b2d0b9304ce0b368cf2bb
  Author: Joachim Jenke <jenke at itc.rwth-aachen.de>
  Date:   2023-11-21 (Tue, 21 Nov 2023)

  Changed paths:
    M openmp/runtime/src/kmp.h
    M openmp/runtime/src/kmp_taskdeps.cpp
    A openmp/runtime/test/tasking/kmp_task_deps.h
    A openmp/runtime/test/tasking/kmp_task_deps_multiple_edges.c
    A openmp/runtime/test/tasking/kmp_task_deps_multiple_edges_inoutset.c

  Log Message:
  -----------
  [OpenMP] Optimized trivial multiple edges from task dependency graph

>From "3.1 Reducing the number of edges" of this [[ https://hal.science/hal-04136674v1/ | paper ]] - Optimization (b)

Task (dependency) nodes have a `successors` list built upon passed dependency.
Given the following code, B will be added to A's successors list building the graph `A` -> `B`
```
// A
 # pragma omp task depend(out: x)
{}

// B
 # pragma omp task depend(in: x)
{}
```

In the following code, B is currently added twice to A's successor list
```
// A
 # pragma omp task depend(out: x, y)
{}

// B
 # pragma omp task depend(in: x, y)
{}
```

This patch removes such dupplicates by checking lastly inserted task in `A` successor list.

Authored by: Romain Pereira (rpereira-dev)
Differential Revision: https://reviews.llvm.org/D158544




More information about the All-commits mailing list