This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Fix hierarchical barrier

Authored by tlwilmar on Jan 7 2021, 9:20 AM.



Hierarchical barrier is an experimental barrier algorithm that uses aspects of machine hierarchy to define the barrier tree structure. This patch fixes offset calculation in hierarchical barrier. The offset is used to store info on a flag about sleeping threads waiting on a location stored in the flag. This commit also fixes a potential deadlock in hierarchical barrier when using infinite blocktime by adjusting the offset value of leaf kids so that it matches the value of leaf state. It also adds testing of default barriers with infinite blocktime, and also tests hierarchical barrier algorithm with both default and infinite blocktime.

Patch by Terry Wilmarth and Nawrin Sultana.

Diff Detail

Event Timeline

tlwilmar requested review of this revision.Jan 7 2021, 9:20 AM
tlwilmar created this revision.
jdoerfert retitled this revision from Fix hierarchical barrier to [OpenMP] Fix hierarchical barrier.Jan 10 2021, 1:44 PM
Nawrin accepted this revision.Jan 11 2021, 8:00 AM


This revision is now accepted and ready to land.Jan 11 2021, 8:00 AM
This revision was automatically updated to reflect the committed changes.