From 21a66e91d04c775dc4a022fb950c4163c593c090 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 26 Apr 2006 10:20:57 +0200 Subject: [PATCH] re PR middle-end/25989 (gomp ICE with -O2 and schedule(guided)) PR middle-end/25989 * tree-flow.h (struct omp_region): Add sched_kind. * omp-low.c (expand_parallel_call): Use region->inner->sched_kind instead of extracting omp for data. (expand_omp_for): Save extracted sched_kind. From-SVN: r113268 --- gcc/ChangeLog | 8 ++++++++ gcc/omp-low.c | 10 +++------- gcc/tree-flow.h | 3 +++ 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3600d043a98..28f8d3f707b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2006-04-26 Jakub Jelinek + + PR middle-end/25989 + * tree-flow.h (struct omp_region): Add sched_kind. + * omp-low.c (expand_parallel_call): Use region->inner->sched_kind + instead of extracting omp for data. + (expand_omp_for): Save extracted sched_kind. + 2006-04-25 Roger Sayle * expmed.c (store_bit_field): Also check whether the bitsize is diff --git a/gcc/omp-low.c b/gcc/omp-low.c index bcc3650c26a..519f48d39be 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -2032,13 +2032,8 @@ expand_parallel_call (struct omp_region *region, basic_block bb, switch (region->inner->type) { case OMP_FOR: - { - tree stmt = last_stmt (region->inner->entry); - struct omp_for_data fd; - extract_omp_for_data (stmt, &fd); - start_ix = BUILT_IN_GOMP_PARALLEL_LOOP_STATIC_START - + fd.sched_kind; - } + start_ix = BUILT_IN_GOMP_PARALLEL_LOOP_STATIC_START + + region->inner->sched_kind; break; case OMP_SECTIONS: start_ix = BUILT_IN_GOMP_PARALLEL_SECTIONS_START; @@ -2944,6 +2939,7 @@ expand_omp_for (struct omp_region *region) push_gimplify_context (); extract_omp_for_data (last_stmt (region->entry), &fd); + region->sched_kind = fd.sched_kind; if (fd.sched_kind == OMP_CLAUSE_SCHEDULE_STATIC && !fd.have_ordered) { diff --git a/gcc/tree-flow.h b/gcc/tree-flow.h index cdf38af822f..87e8328ec05 100644 --- a/gcc/tree-flow.h +++ b/gcc/tree-flow.h @@ -505,6 +505,9 @@ struct omp_region /* The code for the omp directive of this region. */ enum tree_code type; + /* Schedule kind, only used for OMP_FOR type regions. */ + enum omp_clause_schedule_kind sched_kind; + /* True if this is a combined parallel+workshare region. */ bool is_combined_parallel; }; -- 2.30.2