public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: Will Schmidt <will_schmidt@vnet.ibm.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
	       Richard Biener <richard.guenther@gmail.com>,
	       Bill Schmidt <wschmidt@linux.vnet.ibm.com>,
	       David Edelsohn <dje.gcc@gmail.com>
Subject: Re: [PATCH, rs6000] (v2) enable early debug and disable switch for gimple folding
Date: Wed, 09 Aug 2017 21:06:00 -0000	[thread overview]
Message-ID: <20170809204644.GX13471@gate.crashing.org> (raw)
In-Reply-To: <1502289548.6577.39.camel@brimstone.rchland.ibm.com>

On Wed, Aug 09, 2017 at 09:39:08AM -0500, Will Schmidt wrote:
> I also fixed the (missing) space after
> cast for the existing debug code.

Thanks for that :-)


> 	* config/rs6000/rs6000.c: (rs6000_option_override_internal) Add blurb
> 	to indicate when early gimple folding has been disabled.

The colon goes after the closing parenthesis.

> 	(rs6000_invalid_builtin): whitespace.

Capital W.  Or, say what this does?  "Fix whitespace."

> diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
> index 1fb9861..f970f9e 100644
> --- a/gcc/config/rs6000/rs6000.c
> +++ b/gcc/config/rs6000/rs6000.c
> @@ -4180,10 +4180,14 @@ rs6000_option_override_internal (bool global_init_p)
>      {
>        warning (0, N_("-maltivec=le not allowed for big-endian targets"));
>        rs6000_altivec_element_order = 0;
>      }
>  
> +  if (!rs6000_fold_gimple)
> +     fprintf (stderr,
> +     "gimple folding of rs6000 builtins has been disabled.\n");

That first " should line up with the s in stderr.

Should this print a message though?

> +  size_t uns_fncode = (size_t) fn_code;
> +  enum insn_code icode = rs6000_builtin_info[uns_fncode].icode;
> +  const char *fn_name1 = rs6000_builtin_info[uns_fncode].name;
> +  const char *fn_name2 = ((icode != CODE_FOR_nothing)
> +			  ? get_insn_name ((int) icode)
> +			  : "nothing");

Similarly, the ? and : should line up with the second (.
(You can also remove the superfluous outer parens).

> +  if (TARGET_DEBUG_BUILTIN)
> +  {
> +      fprintf (stderr, "rs6000_gimple_fold_builtin %d %s %s\n",
> +	       fn_code, fn_name1, fn_name2);
> +  }

Wrong indent on the {}; but you don't need those here anyway, it's a
single statement.

>      default:
> +	if (TARGET_DEBUG_BUILTIN)
> +	  fprintf (stderr, "gimple builtin intrinsic not matched:%d %s %s \n",
> +			    fn_code, fn_name1, fn_name2);

No space before \n please.

> +mfold-gimple
> +Target Report Var(rs6000_fold_gimple, 1) Init(1)
> +Enable early gimple folding of builtins.

You can drop the ", 1" I think?

Okay with those nits fixed.


Segher

WARNING: multiple messages have this Message-ID
From: Segher Boessenkool <segher@kernel.crashing.org>
To: Will Schmidt <will_schmidt@vnet.ibm.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
	       Richard Biener <richard.guenther@gmail.com>,
	       Bill Schmidt <wschmidt@linux.vnet.ibm.com>,
	       David Edelsohn <dje.gcc@gmail.com>
Subject: Re: [PATCH, rs6000] (v2) enable early debug and disable switch for gimple folding
Date: Thu, 10 Aug 2017 00:04:00 -0000	[thread overview]
Message-ID: <20170809204644.GX13471@gate.crashing.org> (raw)
Message-ID: <20170810000400.5ZXu_l8KmogdxB2eWtUFBbzfsi2aztkBxl84_onern0@z> (raw)
In-Reply-To: <1502289548.6577.39.camel@brimstone.rchland.ibm.com>

On Wed, Aug 09, 2017 at 09:39:08AM -0500, Will Schmidt wrote:
> I also fixed the (missing) space after
> cast for the existing debug code.

Thanks for that :-)


> 	* config/rs6000/rs6000.c: (rs6000_option_override_internal) Add blurb
> 	to indicate when early gimple folding has been disabled.

The colon goes after the closing parenthesis.

> 	(rs6000_invalid_builtin): whitespace.

Capital W.  Or, say what this does?  "Fix whitespace."

> diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
> index 1fb9861..f970f9e 100644
> --- a/gcc/config/rs6000/rs6000.c
> +++ b/gcc/config/rs6000/rs6000.c
> @@ -4180,10 +4180,14 @@ rs6000_option_override_internal (bool global_init_p)
>      {
>        warning (0, N_("-maltivec=le not allowed for big-endian targets"));
>        rs6000_altivec_element_order = 0;
>      }
>  
> +  if (!rs6000_fold_gimple)
> +     fprintf (stderr,
> +     "gimple folding of rs6000 builtins has been disabled.\n");

That first " should line up with the s in stderr.

Should this print a message though?

> +  size_t uns_fncode = (size_t) fn_code;
> +  enum insn_code icode = rs6000_builtin_info[uns_fncode].icode;
> +  const char *fn_name1 = rs6000_builtin_info[uns_fncode].name;
> +  const char *fn_name2 = ((icode != CODE_FOR_nothing)
> +			  ? get_insn_name ((int) icode)
> +			  : "nothing");

Similarly, the ? and : should line up with the second (.
(You can also remove the superfluous outer parens).

> +  if (TARGET_DEBUG_BUILTIN)
> +  {
> +      fprintf (stderr, "rs6000_gimple_fold_builtin %d %s %s\n",
> +	       fn_code, fn_name1, fn_name2);
> +  }

Wrong indent on the {}; but you don't need those here anyway, it's a
single statement.

>      default:
> +	if (TARGET_DEBUG_BUILTIN)
> +	  fprintf (stderr, "gimple builtin intrinsic not matched:%d %s %s \n",
> +			    fn_code, fn_name1, fn_name2);

No space before \n please.

> +mfold-gimple
> +Target Report Var(rs6000_fold_gimple, 1) Init(1)
> +Enable early gimple folding of builtins.

You can drop the ", 1" I think?

Okay with those nits fixed.


Segher

  reply	other threads:[~2017-08-09 20:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-08 21:15 [PATCH, rs6000] " Will Schmidt
2017-08-08 22:31 ` Segher Boessenkool
2017-08-09 14:40   ` Will Schmidt
2017-08-09 14:39 ` [PATCH, rs6000] (v2) " Will Schmidt
2017-08-09 21:06   ` Segher Boessenkool [this message]
2017-08-10  0:04     ` Segher Boessenkool

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=20170809204644.GX13471@gate.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=dje.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=richard.guenther@gmail.com \
    --cc=will_schmidt@vnet.ibm.com \
    --cc=wschmidt@linux.vnet.ibm.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).