public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PR65637] Fix ssa-handling code in expand_omp_for_static_chunk
@ 2015-04-15 13:10 Tom de Vries
  2015-04-15 13:15 ` [PR65637][PATCH][1/3] Fix gcc_assert " Tom de Vries
                   ` (4 more replies)
  0 siblings, 5 replies; 18+ messages in thread
From: Tom de Vries @ 2015-04-15 13:10 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: GCC Patches

[-- Attachment #1: Type: text/plain, Size: 922 bytes --]

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.

Thanks,
- Tom

[-- Attachment #2: 0001-Set-chunk_size-to-one-for-parloops-parallel.patch --]
[-- Type: text/x-patch, Size: 663 bytes --]

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


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2015-09-03  9:20 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-15 13:10 [PR65637] Fix ssa-handling code in expand_omp_for_static_chunk Tom de Vries
2015-04-15 13:15 ` [PR65637][PATCH][1/3] Fix gcc_assert " Tom de Vries
2015-08-31 12:00   ` [PR65637][PATCH][3/5] " Tom de Vries
2015-09-03  9:16     ` Jakub Jelinek
2015-04-15 13:17 ` [PR65637][PATCH][2/3] Fix inner loop phi " Tom de Vries
2015-08-31 12:03   ` [PR65637][PATCH][4/5] " Tom de Vries
2015-09-03  9:20     ` Jakub Jelinek
2015-04-15 13:23 ` [PR65637][PATCH][3/3] Handle 2 preds for fin_bb " Tom de Vries
2015-08-31 12:26   ` [PR65637][PATCH][5/5] " Tom de Vries
2015-09-03  9:40     ` Jakub Jelinek
2015-05-18 13:13 ` [PING][PR65637] Fix ssa-handling code " Tom de Vries
2015-05-18 14:19   ` Tom de Vries
2015-06-08 12:34   ` [PING^2][PR65637] " Tom de Vries
2015-08-31 11:44 ` [PR65637] " Tom de Vries
2015-08-31 11:51   ` [PATCH][1/5] Add param parloops-chunk-size Tom de Vries
2015-09-03  8:57     ` Jakub Jelinek
2015-08-31 11:55   ` [PATCH][2/5] Handle simple latch bb in expand_omp_for_static_chunk Tom de Vries
2015-09-03  9:02     ` Jakub Jelinek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).