potential OpenMP library back ports for 3.9.1

Jonathan,
      Do any of these commits merit back porting to openmp 3.9 branch
for the 3.9.1 release?
                 Jack

Author: hahnfeld
New Revision: 277991

URL: http://llvm.org/viewvc/llvm-project?rev=277991&view=rev
Log:
__kmp_free_task: Fix for serial explicit tasks producing proxy tasks

Consider the following code which may be executed by a serial team:

    int dep;
    #pragma omp target nowait depend(out: dep)
    {
        sleep(1);
    }
    #pragma omp task depend(in: dep)
    {
        #pragma omp target nowait
        {
            sleep(1);
        }
    }

Here the explicit task may not be freed until the nested proxy task has
finished. The current code hasn't considered this and called __kmp_free_task
anyway which triggered an assert because of remaining incomplete children:

    KMP_DEBUG_ASSERT( TCR_4(taskdata->td_incomplete_child_tasks) == 0 );

Differential Revision: https://reviews.llvm.org/D23115

As these are bug fixes they may worth adding to the branch.

I'd also note that the r277991, if accepted, should better be accompanied by the following correction r284747:

Author: achurbanov
New Revision: 284747

URL: http://llvm.org/viewvc/llvm-project?rev=284747&view=rev
Log:
Fixed memory leak mistakenly introduced by https://reviews.llvm.org/D23115

Differential Revision: http://reviews.llvm.org/D25510

- Andrey

Hmm, so r277991 and r277992 would also need

For clarity, can a simple list be made like:

r278332 - patch title or small description
r277991 - patch title or small description
r277992 - patch title or small description
...

Then we can take some out, put some in, and then request the final list be put in to 3.9.1?

-- Johnny

Alright, I would propose the following fixes be backported for 3.9.1:
r278332 - Fixes for hierarchical barrier (possible hang if team size changed).
r285283 - Fixed a memory leak related to task dependencies.
r285703 - Fixed problem introduced by part of https://reviews.llvm.org/D21196.
(Check Task Scheduling Constraint (TSC) on stealing of untied task.)

Additionally, I don't know if this one is needed - Johnny?
r280138 - Appease older gcc compilers for the many-microtask-args.c test

Greetings,
Jonas

280138 isn't going to hurt anything so it is fine. Jack are there any you would like to add?

Here is the list so far:

r278332 - Fixes for hierarchical barrier (possible hang if team size changed).
r280138 - Appease older gcc compilers for the many-microtask-args.c test
r285283 - Fixed a memory leak related to task dependencies.
r285703 - Fixed problem introduced by part of https://reviews.llvm.org/D21196.

-- Johnny