public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* -fopt-info handling
@ 2016-06-27 17:41 Ulrich Drepper
  2016-07-04 21:46 ` Ulrich Drepper
  0 siblings, 1 reply; 5+ messages in thread
From: Ulrich Drepper @ 2016-06-27 17:41 UTC (permalink / raw)
  To: GCC Patches

[-- Attachment #1: Type: text/plain, Size: 445 bytes --]

The manual says about -fop-info:

       If OPTIONS is omitted, it defaults to 'all-all', which means
dump all available optimization info from all the passes.

The current implementation (at at least recent gcc 6.1) don't follow
that, though.  They just ignore the option in that case.

How about the attached patch?  It is simple and doesn't duplicate the
information what "all-all" means and instead let's the option parser
do the hard work.

[-- Attachment #2: d-gcc-opt-info --]
[-- Type: application/octet-stream, Size: 585 bytes --]

2016-06-27  Ulrich Drepper  <drepper@gmail.com>

	* dumpfile.c (opt_info_switch_p_1): Handle -fop-info with ommitted
	options as the manual says.

diff --git a/gcc/dumpfile.c b/gcc/dumpfile.c
index 74522a6..3e10885 100644
--- a/gcc/dumpfile.c
+++ b/gcc/dumpfile.c
@@ -873,7 +873,8 @@ opt_info_switch_p_1 (const char *arg, int *flags, int *optgroup_flags,
   *optgroup_flags = 0;
 
   if (!ptr)
-    return 1;       /* Handle '-fopt-info' without any additional options.  */
+    /* Handle '-fopt-info' without any additional options.  */
+    ptr = "all-all";
 
   while (*ptr)
     {

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: -fopt-info handling
  2016-06-27 17:41 -fopt-info handling Ulrich Drepper
@ 2016-07-04 21:46 ` Ulrich Drepper
  2016-07-05 10:06   ` Richard Biener
  0 siblings, 1 reply; 5+ messages in thread
From: Ulrich Drepper @ 2016-07-04 21:46 UTC (permalink / raw)
  To: GCC Patches

Anyone?

On Mon, Jun 27, 2016 at 1:31 PM, Ulrich Drepper <drepper@gmail.com> wrote:
> The manual says about -fop-info:
>
>        If OPTIONS is omitted, it defaults to 'all-all', which means
> dump all available optimization info from all the passes.
>
> The current implementation (at at least recent gcc 6.1) don't follow
> that, though.  They just ignore the option in that case.
>
> How about the attached patch?  It is simple and doesn't duplicate the
> information what "all-all" means and instead let's the option parser
> do the hard work.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: -fopt-info handling
  2016-07-04 21:46 ` Ulrich Drepper
@ 2016-07-05 10:06   ` Richard Biener
  2016-07-06 12:25     ` Ulrich Drepper
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Biener @ 2016-07-05 10:06 UTC (permalink / raw)
  To: Ulrich Drepper; +Cc: GCC Patches

On Mon, Jul 4, 2016 at 11:45 PM, Ulrich Drepper <drepper@gmail.com> wrote:
> Anyone?
>
> On Mon, Jun 27, 2016 at 1:31 PM, Ulrich Drepper <drepper@gmail.com> wrote:
>> The manual says about -fop-info:
>>
>>        If OPTIONS is omitted, it defaults to 'all-all', which means
>> dump all available optimization info from all the passes.
>>
>> The current implementation (at at least recent gcc 6.1) don't follow
>> that, though.  They just ignore the option in that case.
>>
>> How about the attached patch?  It is simple and doesn't duplicate the
>> information what "all-all" means and instead let's the option parser
>> do the hard work.

I don't think all-all is a useful default.  "optimized" may be though.

Richard.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: -fopt-info handling
  2016-07-05 10:06   ` Richard Biener
@ 2016-07-06 12:25     ` Ulrich Drepper
  2016-07-06 13:26       ` Richard Biener
  0 siblings, 1 reply; 5+ messages in thread
From: Ulrich Drepper @ 2016-07-06 12:25 UTC (permalink / raw)
  To: Richard Biener; +Cc: GCC Patches

[-- Attachment #1: Type: text/plain, Size: 429 bytes --]

On Tue, Jul 5, 2016 at 6:06 AM, Richard Biener
<richard.guenther@gmail.com> wrote:
> I don't think all-all is a useful default.  "optimized" may be though.

I relied on old documentation installed on one of my system.
Apparently the default changed to optimized-optall.  So, no change to
the documentation needed if the general opinion is that this is a sane
default and the following patch actually installs a default behavior.

[-- Attachment #2: d-gcc-opt-info2 --]
[-- Type: application/octet-stream, Size: 447 bytes --]

diff --git a/gcc/dumpfile.c b/gcc/dumpfile.c
index 74522a6..0697557 100644
--- a/gcc/dumpfile.c
+++ b/gcc/dumpfile.c
@@ -873,7 +873,8 @@ opt_info_switch_p_1 (const char *arg, int *flags, int *optgroup_flags,
   *optgroup_flags = 0;
 
   if (!ptr)
-    return 1;       /* Handle '-fopt-info' without any additional options.  */
+    /* Handle '-fopt-info' without any additional options.  */
+    ptr = "optimized-optall";
 
   while (*ptr)
     {

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: -fopt-info handling
  2016-07-06 12:25     ` Ulrich Drepper
@ 2016-07-06 13:26       ` Richard Biener
  0 siblings, 0 replies; 5+ messages in thread
From: Richard Biener @ 2016-07-06 13:26 UTC (permalink / raw)
  To: Ulrich Drepper; +Cc: GCC Patches

On Wed, Jul 6, 2016 at 2:25 PM, Ulrich Drepper <drepper@gmail.com> wrote:
> On Tue, Jul 5, 2016 at 6:06 AM, Richard Biener
> <richard.guenther@gmail.com> wrote:
>> I don't think all-all is a useful default.  "optimized" may be though.
>
> I relied on old documentation installed on one of my system.
> Apparently the default changed to optimized-optall.  So, no change to
> the documentation needed if the general opinion is that this is a sane
> default and the following patch actually installs a default behavior.

Ok.

Thanks,
Richard.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-07-06 13:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-27 17:41 -fopt-info handling Ulrich Drepper
2016-07-04 21:46 ` Ulrich Drepper
2016-07-05 10:06   ` Richard Biener
2016-07-06 12:25     ` Ulrich Drepper
2016-07-06 13:26       ` Richard Biener

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).