In https://reviews.llvm.org/D144634 : Support for Code Generation of loop bind clause
before mapping a directive to the new directive there is a need to check if the parent directive/region is proper for the new mapped directive. e.g.
pragma omp parallel for
for () {
pragma omp loop bind(parallel)
for() {}
}.
After mapping omp loop bind(parallel) to omp for the above example becomes:
pragma omp parallel for
for () {
pragma omp for
for() {}
}.
However, it is illegal to have a for region within another for region.
Rules in the OpenMP Spec “Nesting of Regions” need to be taken into account before mapping.
In https://reviews.llvm.org/D144634 : Support for Code Generation of loop bind clause before mapping a directive to the new directive there is a need to check if the parent directive/region is proper for the new mapped directive. e.g.
pragma omp parallel for
for () {
pragma omp loop bind(parallel)
for() {} }.
After mapping omp loop bind(parallel) to omp for the above example becomes:
pragma omp parallel for
for () {
pragma omp for
for() {} }. However, it is illegal to have a for region within another for region. Rules in the OpenMP Spec “Nesting of Regions” need to be taken into account before mapping.