omp-low.c (build_omp_regions_1): Recognition of combined parallels moved ...
* omp-low.c (build_omp_regions_1): Recognition of combined parallels moved ... (expand_omp): ... here. * gcc.dg/gomp/combined-1.c: New test. From-SVN: r131064
This commit is contained in:
parent
8a171a5948
commit
068e1875cd
@ -1,3 +1,9 @@
|
||||
2007-12-19 Zdenek Dvorak <ook@ucw.cz>
|
||||
|
||||
* omp-low.c (build_omp_regions_1): Recognition of combined parallels
|
||||
moved ...
|
||||
(expand_omp): ... here.
|
||||
|
||||
2007-12-19 Zdenek Dvorak <ook@ucw.cz>
|
||||
|
||||
PR tree-optimization/34355
|
||||
|
@ -3952,6 +3952,11 @@ expand_omp (struct omp_region *region)
|
||||
{
|
||||
while (region)
|
||||
{
|
||||
/* First, determine whether this is a combined parallel+workshare
|
||||
region. */
|
||||
if (region->type == OMP_PARALLEL)
|
||||
determine_parallel_type (region);
|
||||
|
||||
if (region->inner)
|
||||
expand_omp (region->inner);
|
||||
|
||||
@ -4028,11 +4033,6 @@ build_omp_regions_1 (basic_block bb, struct omp_region *parent,
|
||||
region = parent;
|
||||
region->exit = bb;
|
||||
parent = parent->outer;
|
||||
|
||||
/* If REGION is a parallel region, determine whether it is
|
||||
a combined parallel+workshare region. */
|
||||
if (region->type == OMP_PARALLEL)
|
||||
determine_parallel_type (region);
|
||||
}
|
||||
else if (code == OMP_ATOMIC_STORE)
|
||||
{
|
||||
|
@ -1,3 +1,7 @@
|
||||
2007-12-19 Zdenek Dvorak <ook@ucw.cz>
|
||||
|
||||
* gcc.dg/gomp/combined-1.c: New test.
|
||||
|
||||
2007-12-19 Zdenek Dvorak <ook@ucw.cz>
|
||||
|
||||
PR tree-optimization/34355
|
||||
|
24
gcc/testsuite/gcc.dg/gomp/combined-1.c
Normal file
24
gcc/testsuite/gcc.dg/gomp/combined-1.c
Normal file
@ -0,0 +1,24 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O1 -fopenmp -fdump-tree-final_cleanup" } */
|
||||
|
||||
int a[10];
|
||||
int foo (void)
|
||||
{
|
||||
int i;
|
||||
#pragma omp parallel for schedule(runtime)
|
||||
for (i = 0; i < 10; i++)
|
||||
a[i] = i;
|
||||
#pragma omp parallel
|
||||
#pragma omp for schedule(runtime)
|
||||
for (i = 0; i < 10; i++)
|
||||
a[i] = 10 - i;
|
||||
#pragma omp parallel
|
||||
{
|
||||
#pragma omp for schedule(runtime)
|
||||
for (i = 0; i < 10; i++)
|
||||
a[i] = i;
|
||||
}
|
||||
}
|
||||
|
||||
/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel_loop_runtime_start" 3 "final_cleanup" } } */
|
||||
/* { dg-final { cleanup-tree-dump "final_cleanup" } } */
|
Loading…
Reference in New Issue
Block a user