public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <law@redhat.com>
To: "Iyer, Balaji V" <balaji.v.iyer@intel.com>,
	       "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Cc: "Zamyatin, Igor" <igor.zamyatin@intel.com>
Subject: Re: [PATCH] PR 60586
Date: Tue, 01 Sep 2015 22:26:00 -0000	[thread overview]
Message-ID: <55E62613.7060706@redhat.com> (raw)
In-Reply-To: <BF230D13CA30DD48930C31D4099330003B0F002A@fmsmsx101.amr.corp.intel.com>

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 for trunk?
>
> Here are the Changelog entries:
>
> gcc/c-family/ChangeLog
> 2015-08-31  Balaji V. Iyer<balaji.v.iyer@intel.com>
>
>          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<balaji.v.iyer@intel.com>
>
>          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<balaji.v.iyer@intel.com>
>
>          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.

I think once that's fixed this ought to be ready for the trunk.

jeff

  reply	other threads:[~2015-09-01 22:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-01  0:05 Iyer, Balaji V
2015-09-01 22:26 ` Jeff Law [this message]
2015-09-02  1:16   ` Iyer, Balaji V
2015-09-02  1:22   ` Iyer, Balaji V
2015-09-02  4:30   ` Iyer, Balaji V
2015-09-02 20:58     ` Jeff Law

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55E62613.7060706@redhat.com \
    --to=law@redhat.com \
    --cc=balaji.v.iyer@intel.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=igor.zamyatin@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).