This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: OpenACC Firstprivate
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Nathan Sidwell <nathan at acm dot org>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Cesar Philippidis <cesar_philippidis at mentor dot com>
- Date: Wed, 11 Nov 2015 09:04:59 +0100
- Subject: Re: OpenACC Firstprivate
- Authentication-results: sourceware.org; auth=none
- References: <563E01A4 dot 20607 at acm dot org> <20151109134619 dot GQ5675 at tucnak dot redhat dot com> <5640A6B3 dot 3030409 at acm dot org> <20151109141034 dot GS5675 at tucnak dot redhat dot com> <5640B1B4 dot 2070701 at acm dot org> <5641FB67 dot 9010409 at acm dot org>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, Nov 10, 2015 at 09:12:55AM -0500, Nathan Sidwell wrote:
> + /* Create a local object to hold the instance
> + value. */
> + tree inst = create_tmp_var
> + (TREE_TYPE (TREE_TYPE (new_var)),
> + IDENTIFIER_POINTER (DECL_NAME (new_var)));
Can you please rewrite this as:
tree type = TREE_TYPE (TREE_TYPE (new_var));
tree n = DECL_NAME (new_var);
tree inst = create_tmp_var (type, IDENTIFIER_POINTER (n));
or so (perhaps
const char *name
= IDENTIFIER_POINTER (DECL_NAME (new_var));
instead but then it takes one more line)?
I really don't like line breaks before opening ( unless really
necessary.
Otherwise LGTM.
Jakub