This is required to be NULL for implicit barriers at the end of a
parallel region. Noticed in review of D43191.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
runtime/test/ompt/parallel/normal.c | ||
---|---|---|
33–35 ↗ | (On Diff #134277) | Another option would be to only use CHECK-DAG but this doesn't enforce the requirement that the arguments are on the same line. IMO we don't lose any coverage because the same information is checked in THREADS. To be honest, I even think we could drop the previous CHECK-SAME lines and only check that we get the right callbacks before parallel_end... |
runtime/src/kmp_barrier.cpp | ||
---|---|---|
1892 ↗ | (On Diff #134277) | Please keep that one and remove the duplikate at the end of the block, including the comment. You can add a comment here, that this state change is important for the algorithm described in runtime/src/kmp_wait_release.h:161 |
runtime/src/kmp_runtime.cpp | ||
7171 ↗ | (On Diff #134277) | Same here: You can add a comment here, that this state change is important for the algorithm described in runtime/src/kmp_wait_release.h:161 |
runtime/test/ompt/parallel/normal.c | ||
16 ↗ | (On Diff #134277) | The idea of listing the individual callbacks here was to eventually allow most tests to run successfully with LIBOMP_OMPT_OPTIONAL=off. |
33–35 ↗ | (On Diff #134277) | Only checking for the right sequence of events here sounds good to me. |
runtime/src/kmp_barrier.cpp | ||
---|---|---|
1892 ↗ | (On Diff #134277) | I'm not sure I understand your reasoning here: There is no intervening call to __kmp_wait_template inside this OMPT block so I don't think there is an observable difference except the state during the callback. |
runtime/test/ompt/parallel/normal.c | ||
33–35 ↗ | (On Diff #134277) | Okay, I'll remove the other CHECK-SAMEs as proposed. |
runtime/src/kmp_barrier.cpp | ||
---|---|---|
1892 ↗ | (On Diff #134277) | The reasoning for having the status change here is independent of the changed comment. omp_state_wait_barrier_implicit should indicate, that the thread is actually waiting in the barrier. Calling the callback functions is more the overhead kind of state, so I would prefer to keep the state change here and remove the redundant assignment below. The comment below is wrong anyway. |
Move state change to omp_state_overhead as requested, collapse one if and add check for ompt_enabled.enabled to the other, drop argument checking from CHECK prefix.