From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 50077 invoked by alias); 15 Apr 2015 13:10:36 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 50065 invoked by uid 89); 15 Apr 2015 13:10:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 15 Apr 2015 13:10:33 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-05.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1YiN5J-0003P2-8Q from Tom_deVries@mentor.com ; Wed, 15 Apr 2015 06:10:29 -0700 Received: from [127.0.0.1] (137.202.0.76) by SVR-IES-FEM-05.mgc.mentorg.com (137.202.0.112) with Microsoft SMTP Server id 14.3.224.2; Wed, 15 Apr 2015 14:10:27 +0100 Message-ID: <552E6341.4040401@mentor.com> Date: Wed, 15 Apr 2015 13:10:00 -0000 From: Tom de Vries User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Jakub Jelinek CC: GCC Patches Subject: [PR65637] Fix ssa-handling code in expand_omp_for_static_chunk Content-Type: multipart/mixed; boundary="------------040204020307070502040509" X-SW-Source: 2015-04/txt/msg00757.txt.bz2 --------------040204020307070502040509 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-length: 922 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 --------------040204020307070502040509 Content-Type: text/x-patch; name="0001-Set-chunk_size-to-one-for-parloops-parallel.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-Set-chunk_size-to-one-for-parloops-parallel.patch" Content-length: 663 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 --------------040204020307070502040509--