This is an archive of the discontinued LLVM Phabricator instance.

Fix team reuse with foreign threads.

Authored by jlpeyton on May 5 2016, 9:10 AM.



After hot teams were enabled by default, the library started using levels kept in the team structure. The levels are broken in case foreign thread exits and puts its team into the pool which is then re-used by another foreign thread. The broken behavior observed is when printing the levels for each new team, one gets 1, 2, 1, 2, 1, 2, etc. This makes the library believe that every other team is nested which is incorrect. What is wanted is for the levels to be 1, 1, 1, etc.

Diff Detail


Event Timeline

jlpeyton updated this revision to Diff 56297.May 5 2016, 9:10 AM
jlpeyton retitled this revision from to Fix team reuse with foreign threads..
jlpeyton updated this object.
jlpeyton added a reviewer: AndreyChurbanov.
jlpeyton set the repository for this revision to rL LLVM.
jlpeyton added a subscriber: openmp-commits.
jcownie added a subscriber: jcownie.May 5 2016, 9:21 AM

LGTM, though the test code may need some reworking to handle Windows...

AndreyChurbanov accepted this revision.May 12 2016, 3:04 AM
AndreyChurbanov edited edge metadata.


This revision is now accepted and ready to land.May 12 2016, 3:04 AM
This revision was automatically updated to reflect the committed changes.