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
This commit is contained in:
Jakub Jelinek 2006-04-26 10:20:57 +02:00 committed by Jakub Jelinek
parent 887dc802b3
commit 21a66e91d0
3 changed files with 14 additions and 7 deletions

View 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

View 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)
{

View 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;
};