Page MenuHomePhabricator

Add new OpenMP 4.5 doacross loop nest feature

Authored by jlpeyton on Feb 18 2016, 10:29 AM.



From the standard: A doacross loop nest is a loop nest that has cross-iteration
dependence. An iteration is dependent on one or more lexicographically earlier
iterations. The ordered clause parameter on a loop directive identifies the
loop(s) associated with the doacross loop nest.

The init/fini routines allocate/free doacross buffer(s) for each loop for each thread.
The wait routine waits for a flag designated by the dependence vector. The post routine sets the flag designated by current iteration vector.
We use a similar technique of shared buffer indices that covers up to 7 nowait loops executed simultaneously by different threads (number 7 has no real meaning, just heuristic value).
Also, the size of structures are kept intact via reducing dummy arrays.

This needs to be put into the OpenMP runtime library in order for the compiler
team to develop the compiler side of the implementation.

Diff Detail


Event Timeline

jlpeyton updated this revision to Diff 48354.Feb 18 2016, 10:29 AM
jlpeyton retitled this revision from to Add new OpenMP 4.5 doacross loop nest feature.
jlpeyton updated this object.
jlpeyton set the repository for this revision to rL LLVM.
jlpeyton added a subscriber: openmp-commits.
jlpeyton updated this object.Feb 18 2016, 11:26 AM
AndreyChurbanov accepted this revision.Mar 1 2016, 8:47 AM
AndreyChurbanov edited edge metadata.


This revision is now accepted and ready to land.Mar 1 2016, 8:47 AM
This revision was automatically updated to reflect the committed changes.