https://bugs.llvm.org/show_bug.cgi?id=46193

            Bug ID: 46193
           Summary: Dependencies for undeferred tasks are blocking
           Product: OpenMP
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Clang Compiler Support
          Assignee: unassignedclangb...@nondot.org
          Reporter: pro...@itc.rwth-aachen.de
                CC: llvm-bugs@lists.llvm.org

Created attachment 23573
  --> https://bugs.llvm.org/attachment.cgi?id=23573&action=edit
reproducer

Other than https://bugs.llvm.org/show_bug.cgi?id=46185, this is no correctness
issue, but a possible performance issue.

Clang transforms undeferred tasks semantically like this:

#pragma omp task depend(...) if(0)

to:

#pragma omp taskwait depend(...)
#pragma omp task if(0)

As stated in the previous issue, this is only valid for in/inout/out
dependencies in absense of a detached clause.
The dependency mutexinoutset would allow the undeferred task to execute unless
another task with the same dependency is currently running. In the attached
code, the second task is blocked by the dependency to the first task. The third
task executes right away. The forth task could execute, but waits for the
second task to finish.

>From my perspective, we should not use the _if0 runtime entry points in those
scenarios, but rather just mark the created task as undeferred and let the
runtime manage the execution.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to