From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 43755 invoked by alias); 2 Sep 2015 01:22: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 43745 invoked by uid 89); 2 Sep 2015 01:22:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.1 required=5.0 tests=AWL,BAYES_50,SPF_PASS,SUBJ_ALL_CAPS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mga11.intel.com Received: from mga11.intel.com (HELO mga11.intel.com) (192.55.52.93) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 02 Sep 2015 01:22:34 +0000 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP; 01 Sep 2015 18:22:32 -0700 X-ExtLoop1: 1 Received: from orsmsx107.amr.corp.intel.com ([10.22.240.5]) by orsmga002.jf.intel.com with ESMTP; 01 Sep 2015 18:22:32 -0700 Received: from orsmsx112.amr.corp.intel.com (10.22.240.13) by ORSMSX107.amr.corp.intel.com (10.22.240.5) with Microsoft SMTP Server (TLS) id 14.3.224.2; Tue, 1 Sep 2015 18:22:32 -0700 Received: from fmsmsx153.amr.corp.intel.com (10.18.125.6) by ORSMSX112.amr.corp.intel.com (10.22.240.13) with Microsoft SMTP Server (TLS) id 14.3.224.2; Tue, 1 Sep 2015 18:22:32 -0700 Received: from fmsmsx101.amr.corp.intel.com ([169.254.1.27]) by FMSMSX153.amr.corp.intel.com ([169.254.9.198]) with mapi id 14.03.0224.002; Tue, 1 Sep 2015 18:22:31 -0700 From: "Iyer, Balaji V" To: Jeff Law , "gcc-patches@gcc.gnu.org" CC: "Zamyatin, Igor" Subject: RE: [PATCH] PR 60586 Date: Wed, 02 Sep 2015 01:22:00 -0000 Message-ID: References: <55E62613.7060706@redhat.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-SW-Source: 2015-09/txt/msg00111.txt.bz2 > -----Original Message----- > From: Iyer, Balaji V > Sent: Tuesday, September 1, 2015 6:17 PM > To: 'Jeff Law'; gcc-patches@gcc.gnu.org > Cc: Zamyatin, Igor > Subject: RE: [PATCH] PR 60586 >=20 >=20 >=20 > > -----Original Message----- > > From: Jeff Law [mailto:law@redhat.com] > > Sent: Tuesday, September 1, 2015 3:26 PM > > To: Iyer, Balaji V; gcc-patches@gcc.gnu.org > > Cc: Zamyatin, Igor > > Subject: Re: [PATCH] PR 60586 > > > > On 08/31/2015 06:04 PM, Iyer, Balaji V wrote: > > > Hello Everyone, > > > This patch will fix the bug reported in Bugzilla, PR 60586. The > > > issue > > was that the spawned function's function arguments must not be pushed > > into the nested/lambda function. This patch should fix that issue. > > > > > > I have tested this on x86_64 (linux and Cygwin flavors). Is this OK f= or > trunk? > > > > > > Here are the Changelog entries: > > > > > > gcc/c-family/ChangeLog > > > 2015-08-31 Balaji V. Iyer > > > > > > PR middle-end/60586 > > > * c-common.h: Added two more parameters to the > > gimplify_cilk_spawn > > > function. > > > * c-gimplify.c (c_gimplify_expr): Likewise. > > > * cilk.c (gimplify_cilk_spawn): Likewise and called > > > gimplify_call_params_in_spawned_fn. > > > (gimplify_call_params_in_spawned_fn): New function. > > > > > > gcc/cp/ChangeLog > > > 2015-08-31 Balaji V. Iyer > > > > > > PR middle-end/60586 > > > * cp-gimplify.c (cp_gimplify_expr): Added two additional > > > parameters > > to > > > gimplify_cilk_spawn. > > > > > > gcc/testsuite/ChangeLog > > > 2015-08-31 Balaji V. Iyer > > > > > > PR middle-end/60586 > > > * c-c++-common/cilk-plus/CK/pr60586.c: New file. > > > * g++.dg/cilk-plus/CK/pr60586.cc: Likewise. > > > > > > > > > Thanks, > > > > > > Balaji V. Iyer. > > > > > > > > > diff.txt > > > > > > > > > diff --git a/gcc/c-family/cilk.c b/gcc/c-family/cilk.c index > > > 1012a4f..1fe6685 100644 > > > --- a/gcc/c-family/cilk.c > > > +++ b/gcc/c-family/cilk.c > > > @@ -33,6 +33,7 @@ along with GCC; see the file COPYING3. If not see > > > #include "gimplify.h" > > > #include "tree-iterator.h" > > > #include "tree-inline.h" > > > +#include "cp/cp-tree.h" > > Presumably you needed this for AGGR_INIT_EXPR. I believe you need to > > refactor the code a bit -- including a C++ front-end header file into > > something in c-family seems wrong. > > > > While it may not break in this specific instance, but it is a modularity > violation. > > > > > > > > > #include "c-family/c-common.h" > > > #include "toplev.h" > > > #include "tm.h" > > > @@ -762,12 +763,37 @@ create_cilk_wrapper (tree exp, tree *args_out) > > > return fndecl; > > > } > > > > > > +/* Gimplify all the parameters for the Spawned function. *EXPR_P > > > +can be > > a > > > + CALL_EXPR, INIT_EXPR, MODIFY_EXPR or TARGET_EXPR. *PRE_P and > > *POST_P are > > > + gimple sequences from the caller of gimplify_cilk_spawn. */ > > Comment doesn't match the code, code also checks for AGGR_INIT_EXPR. > > > > Given the dependency on AGGR_INIT_EXPR, it seems this checking > somehow > > needs to move into the front-ends. >=20 > Will you be OK if I make the function "gimplify_call_params_in_spawned_fn" > part of the targetm structure? >=20 Sorry, I meant lang_hooks. > Thanks, >=20 > Balaji V. Iyer. >=20 > > > > I think once that's fixed this ought to be ready for the trunk. > > > > jeff