From: Frederik Harwath Date: Thu, 30 Mar 2023 14:22:07 +0000 (+0200) Subject: openmp: Handle GIMPLE_OMP_METADIRECTIVE in walk_omp_for_loops X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=17367562f120f28639e5e17a5c5b00d673ac9fd9;p=thirdparty%2Fgcc.git openmp: Handle GIMPLE_OMP_METADIRECTIVE in walk_omp_for_loops gcc/ChangeLog: * omp-transform-loops.cc (walk_omp_for_loops): Handle GIMPLE_OMP_METADIRECTIVE. --- diff --git a/gcc/ChangeLog.omp b/gcc/ChangeLog.omp index 28b3990df1a6..5e76158db068 100644 --- a/gcc/ChangeLog.omp +++ b/gcc/ChangeLog.omp @@ -1,3 +1,8 @@ +2023-03-31 Frederik Harwath + + * omp-transform-loops.cc (walk_omp_for_loops): Handle + GIMPLE_OMP_METADIRECTIVE. + 2023-03-27 Julian Brown * omp-builtins.def (BUILT_IN_OMP_IS_INITIAL_DEVICE): New builtin. diff --git a/gcc/omp-transform-loops.cc b/gcc/omp-transform-loops.cc index 2e136b6d086a..ce8e8f3d0931 100644 --- a/gcc/omp-transform-loops.cc +++ b/gcc/omp-transform-loops.cc @@ -1697,6 +1697,21 @@ walk_omp_for_loops (gimple_seq *seq, walk_ctx *ctx) break; } + case GIMPLE_OMP_METADIRECTIVE: + { + gimple *variant = gimple_omp_metadirective_variants (stmt); + + while (variant) + { + gbind *bind = ctx->bind; + walk_omp_for_loops (gimple_omp_body_ptr (variant), ctx); + ctx->bind = bind; + + variant = variant->next; + } + } + break; + default: gcc_assert (!gimple_has_substatements (stmt)); continue;