This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Clean up for hidden helper task
ClosedPublic

Authored by tianshilei1992 on Jul 28 2021, 3:22 PM.

Details

Summary

This patch makes some clean up for code of hidden helper task.

Diff Detail

Event Timeline

tianshilei1992 created this revision.Jul 28 2021, 3:22 PM
tianshilei1992 requested review of this revision.Jul 28 2021, 3:22 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 28 2021, 3:22 PM
openmp/runtime/src/kmp_taskdeps.h
147–151

This shouldn't be the encountering tid, but any random number in [0,teamsize).
The value is used as an index to the array of threads for the team to which the task binds.

openmp/runtime/src/kmp_tasking.cpp
3953

Either add an assertion (start<nthreads) or limit the value to nthreads

tianshilei1992 marked an inline comment as done.

rebase and fix comments

openmp/runtime/src/kmp_taskdeps.h
147–151

__kmp_tid_from_gtid can make sure we get the right tid, aka [0, team size).

protze.joachim accepted this revision.Aug 4 2021, 1:32 AM

lgtm.
Please run git clang-format before committing to address the per-merge checks.

This revision is now accepted and ready to land.Aug 4 2021, 1:32 AM

git clang-format

This revision was landed with ongoing or failed builds.Aug 4 2021, 9:36 AM
This revision was automatically updated to reflect the committed changes.