aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2006-04-26 10:20:57 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2006-04-26 10:20:57 +0200
commit21a66e91d04c775dc4a022fb950c4163c593c090 (patch)
treefec7ee7b475d5fccd6db80f93052baa34e06da9e
parent887dc802b3408d0c815ff2aaecd791fa2fd90725 (diff)
downloadgcc-21a66e91d04c775dc4a022fb950c4163c593c090.zip
gcc-21a66e91d04c775dc4a022fb950c4163c593c090.tar.gz
gcc-21a66e91d04c775dc4a022fb950c4163c593c090.tar.bz2
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
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/omp-low.c10
-rw-r--r--gcc/tree-flow.h3
3 files changed, 14 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 3600d04..28f8d3f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2006-04-26 Jakub Jelinek <jakub@redhat.com>
+
+ 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 <roger@eyesopen.com>
* expmed.c (store_bit_field): Also check whether the bitsize is
diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index bcc3650..519f48d 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 cdf38af..87e8328 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;
};