Message ID | 552E6341.4040401@mentor.com |
---|---|
State | New |
Headers | show |
On 15-04-15 15:10, Tom de Vries wrote: > Hi, > > This patch series fixes PR65637. > > Currently, ssa-handling code in expand_omp_for_static_chunk is dead and not > exercised by testing. > > Ssa-handling code in omp-low.c is only triggered by pass_parallelize_loops, and > that pass doesn't specify a chunk size on the GIMPLE_OMP_FOR it constructs, so > that only exercises the expand_omp_for_static_nochunk path. > > Using the attached trigger patch, we excercise the ssa-handling code in > expand_omp_for_static_chunk. The following patch series fixes the problems in > the ssa-handling code that we encounter. > > 1. Fix gcc_assert in expand_omp_for_static_chunk > 2. Fix inner loop phi in expand_omp_for_static_chunk > 3. Handle 2 preds for fin_bb in expand_omp_for_static_chunk > > The patch series has been bootstrapped and reg-tested on x86_64 together with > attached trigger patch. > > I'll post the patches from the patch series individually, in response to this > email. > Ping for the three patches. Thanks, - Tom > 0001-Set-chunk_size-to-one-for-parloops-parallel.patch > > > Set chunk_size to one for parloops parallel > > --- > gcc/tree-parloops.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/gcc/tree-parloops.c b/gcc/tree-parloops.c > index 62a6444..862c420 100644 > --- a/gcc/tree-parloops.c > +++ b/gcc/tree-parloops.c > @@ -1719,6 +1719,7 @@ create_parallel_loop (struct loop *loop, tree loop_fn, tree data, > type = TREE_TYPE (cvar); > t = build_omp_clause (loc, OMP_CLAUSE_SCHEDULE); > OMP_CLAUSE_SCHEDULE_KIND (t) = OMP_CLAUSE_SCHEDULE_STATIC; > + OMP_CLAUSE_SCHEDULE_CHUNK_EXPR (t) = integer_one_node; > > for_stmt = gimple_build_omp_for (NULL, GF_OMP_FOR_KIND_FOR, t, 1, NULL); > gimple_set_location (for_stmt, loc); > -- 1.9.1 >
On 18-05-15 14:53, Tom de Vries wrote: > On 15-04-15 15:10, Tom de Vries wrote: >> Hi, >> >> This patch series fixes PR65637. >> >> Currently, ssa-handling code in expand_omp_for_static_chunk is dead and not >> exercised by testing. >> >> Ssa-handling code in omp-low.c is only triggered by pass_parallelize_loops, and >> that pass doesn't specify a chunk size on the GIMPLE_OMP_FOR it constructs, so >> that only exercises the expand_omp_for_static_nochunk path. >> >> Using the attached trigger patch, we excercise the ssa-handling code in >> expand_omp_for_static_chunk. The following patch series fixes the problems in >> the ssa-handling code that we encounter. >> >> 1. Fix gcc_assert in expand_omp_for_static_chunk >> 2. Fix inner loop phi in expand_omp_for_static_chunk >> 3. Handle 2 preds for fin_bb in expand_omp_for_static_chunk >> >> The patch series has been bootstrapped and reg-tested on x86_64 together with >> attached trigger patch. >> >> I'll post the patches from the patch series individually, in response to this >> email. >> > > Ping for the three patches. > Committed to gomp-4_0-branch. > Thanks, > - Tom > >> 0001-Set-chunk_size-to-one-for-parloops-parallel.patch >> >> >> Set chunk_size to one for parloops parallel >> >> --- >> gcc/tree-parloops.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/gcc/tree-parloops.c b/gcc/tree-parloops.c >> index 62a6444..862c420 100644 >> --- a/gcc/tree-parloops.c >> +++ b/gcc/tree-parloops.c >> @@ -1719,6 +1719,7 @@ create_parallel_loop (struct loop *loop, tree loop_fn, >> tree data, >> type = TREE_TYPE (cvar); >> t = build_omp_clause (loc, OMP_CLAUSE_SCHEDULE); >> OMP_CLAUSE_SCHEDULE_KIND (t) = OMP_CLAUSE_SCHEDULE_STATIC; >> + OMP_CLAUSE_SCHEDULE_CHUNK_EXPR (t) = integer_one_node; >> >> for_stmt = gimple_build_omp_for (NULL, GF_OMP_FOR_KIND_FOR, t, 1, NULL); >> gimple_set_location (for_stmt, loc); >> -- 1.9.1 >> >
On 18/05/15 14:53, Tom de Vries wrote: > On 15-04-15 15:10, Tom de Vries wrote: >> Hi, >> >> This patch series fixes PR65637. >> >> Currently, ssa-handling code in expand_omp_for_static_chunk is dead >> and not >> exercised by testing. >> >> Ssa-handling code in omp-low.c is only triggered by >> pass_parallelize_loops, and >> that pass doesn't specify a chunk size on the GIMPLE_OMP_FOR it >> constructs, so >> that only exercises the expand_omp_for_static_nochunk path. >> >> Using the attached trigger patch, we excercise the ssa-handling code in >> expand_omp_for_static_chunk. The following patch series fixes the >> problems in >> the ssa-handling code that we encounter. >> >> 1. Fix gcc_assert in expand_omp_for_static_chunk >> 2. Fix inner loop phi in expand_omp_for_static_chunk >> 3. Handle 2 preds for fin_bb in expand_omp_for_static_chunk >> >> The patch series has been bootstrapped and reg-tested on x86_64 >> together with >> attached trigger patch. >> >> I'll post the patches from the patch series individually, in response >> to this >> email. >> > > Ping for the three patches. > Ping^2. Original posting at https://gcc.gnu.org/ml/gcc-patches/2015-04/msg00757.html . Thanks, - Tom
On 15/04/15 15:10, Tom de Vries wrote: > Hi, > > This patch series fixes PR65637. > > Currently, ssa-handling code in expand_omp_for_static_chunk is dead and > not exercised by testing. > > Ssa-handling code in omp-low.c is only triggered by > pass_parallelize_loops, and that pass doesn't specify a chunk size on > the GIMPLE_OMP_FOR it constructs, so that only exercises the > expand_omp_for_static_nochunk path. > > Using the attached trigger patch, we excercise the ssa-handling code in > expand_omp_for_static_chunk. > > 1. Fix gcc_assert in expand_omp_for_static_chunk > 2. Fix inner loop phi in expand_omp_for_static_chunk > 3. Handle 2 preds for fin_bb in expand_omp_for_static_chunk I'm posting an updated series. 1. Add param parloops-chunk-size 2. Handle simple latch bb in expand_omp_for_static_chunk 3. Fix gcc_assert in expand_omp_for_static_chunk 4. Fix inner loop phi in expand_omp_for_static_chunk 5. Handle 2 preds for fin_bb in expand_omp_for_static_chunk There are two new patches, (1) and (2) in the new numbering. The first patch adds a param parloops-chunk-size, which means the ssa-handling code in expand_omp_for_static_chunk is no longer dead. The second patch handles simple latches in expand_omp_for_static_chunk, similar to the fix for PR66846 in expand_omp_for_static_nochunk. The rest of the patches are now updated to include the testcases (and patch number 4 has been updated to handle simple latches). The patch series has been bootstrapped and reg-tested on x86_64. I'll post the patches from the patch series individually. The first two in response to this email, the latter three in response to the earlier submissions. Thanks, - Tom
Set chunk_size to one for parloops parallel --- gcc/tree-parloops.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/tree-parloops.c b/gcc/tree-parloops.c index 62a6444..862c420 100644 --- a/gcc/tree-parloops.c +++ b/gcc/tree-parloops.c @@ -1719,6 +1719,7 @@ create_parallel_loop (struct loop *loop, tree loop_fn, tree data, type = TREE_TYPE (cvar); t = build_omp_clause (loc, OMP_CLAUSE_SCHEDULE); OMP_CLAUSE_SCHEDULE_KIND (t) = OMP_CLAUSE_SCHEDULE_STATIC; + OMP_CLAUSE_SCHEDULE_CHUNK_EXPR (t) = integer_one_node; for_stmt = gimple_build_omp_for (NULL, GF_OMP_FOR_KIND_FOR, t, 1, NULL); gimple_set_location (for_stmt, loc); -- 1.9.1