This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Remove explicit call for implicit barrier
ClosedPublic

Authored by Hahnfeld on Dec 16 2015, 3:54 AM.

Details

Summary

#pragma omp parallel needs an implicit barrier that is currently done by an explicit call to __kmpc_barrier. However, the runtime already ensures a barrier in __kmpc_fork_call which currently leads to two barriers per region per thread.

Or are there any corner cases where this is needed? I couldn't make up a test case...

Diff Detail

Repository
rL LLVM

Event Timeline

Hahnfeld updated this revision to Diff 42984.Dec 16 2015, 3:54 AM
Hahnfeld retitled this revision from to [OpenMP] Remove explicit call for implicit barrier.
Hahnfeld updated this object.
Hahnfeld added reviewers: ABataev, hfinkel, kkwli0, rjmccall.
Hahnfeld added a subscriber: cfe-commits.

I didn't adjust the tests, I'm sorry! Will do so if the change is acceptable in general...

This revision was automatically updated to reflect the committed changes.
ABataev edited edge metadata.Dec 18 2015, 2:31 AM

Fixed tests and committed. Thanks!