This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Prepare Sema for initial implementation for pragma 'distribute parallel for'
ClosedPublic

Authored by carlo.bertolli on Feb 13 2017, 6:54 PM.

Details

Summary

This patch adds two fields for use in the implementation of 'distribute parallel for':

  1. The increment expression for the distribute loop. As the chunk assigned to a team is executed by multiple threads within the 'parallel for' region, the increment expression has to correspond to the value returned by the related runtime call (for_static_init).
  1. The upper bound of the innermost loop ('for' in 'distribute parallel for') is not the globalUB expression normally used for pragma 'for' when found in isolation. It is instead the upper bound of the chunk assigned to the team ('distribute' loop). In this way, we prevent teams from executing chunks assigned to other teams.

The use of these two fields can be see in a related explanatory patch:
https://reviews.llvm.org/D29508

Diff Detail

Repository
rL LLVM