re PR middle-end/25989 (gomp ICE with -O2 and schedule(guided))
authorJakub Jelinek <jakub@redhat.com>
Wed, 26 Apr 2006 08:20:57 +0000 (10:20 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 26 Apr 2006 08:20:57 +0000 (10:20 +0200)
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
gcc/omp-low.c
gcc/tree-flow.h

index 3600d043a98dfb56d7b34d1fbee8105cdf963b4c..28f8d3f707b96e01334009fc1d923b712238426e 100644 (file)
@@ -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
index bcc3650c26a1d2247e4f565f6304bfa2947ac98f..519f48d39bee9a6d0accc665c089fc6d21533f2d 100644 (file)
@@ -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)
     {
index cdf38af822f75c7848439af66a4b29ed379db7bc..87e8328ec05f6d1560355ccc8db2c7d78da3c5bb 100644 (file)
@@ -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;
 };