public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Cgraph alias reorg 13/14 (disable inlining functions called once at -O0
@ 2011-06-10 18:47 Jan Hubicka
  2011-06-10 20:10 ` Richard Guenther
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Hubicka @ 2011-06-10 18:47 UTC (permalink / raw)
  To: gcc-patches

Hi,
by some mistake we enable functions called once at -O0 and it actually happens from
time to time.

Bootstrapped/regtested x86_64-linux, will commit it shortly.

Honza

	* opts.c (default_options): Enlist OPT_finline_functions_called_once.
	* common.opt (flag_inline_functions_called_once):Do not initialize to 1.
Index: opts.c
===================================================================
--- opts.c	(revision 174916)
+++ opts.c	(working copy)
@@ -486,6 +486,7 @@ static const struct default_options defa
     /* Inlining of functions reducing size is a good idea with -Os
        regardless of them being declared inline.  */
     { OPT_LEVELS_3_PLUS_AND_SIZE, OPT_finline_functions, NULL, 1 },
+    { OPT_LEVELS_1_PLUS, OPT_finline_functions_called_once, NULL, 1 },
     { OPT_LEVELS_3_PLUS, OPT_funswitch_loops, NULL, 1 },
     { OPT_LEVELS_3_PLUS, OPT_fgcse_after_reload, NULL, 1 },
     { OPT_LEVELS_3_PLUS, OPT_ftree_vectorize, NULL, 1 },
Index: common.opt
===================================================================
--- common.opt	(revision 174916)
+++ common.opt	(working copy)
@@ -1233,7 +1233,7 @@ Common Report Var(flag_inline_functions)
 Integrate simple functions into their callers
 
 finline-functions-called-once
-Common Report Var(flag_inline_functions_called_once) Init(1) Optimization
+Common Report Var(flag_inline_functions_called_once) Optimization
 Integrate functions called once into their callers
 
 finline-limit-

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

* Re: Cgraph alias reorg 13/14 (disable inlining functions called once at -O0
  2011-06-10 18:47 Cgraph alias reorg 13/14 (disable inlining functions called once at -O0 Jan Hubicka
@ 2011-06-10 20:10 ` Richard Guenther
  2011-06-10 20:59   ` Jan Hubicka
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Guenther @ 2011-06-10 20:10 UTC (permalink / raw)
  To: Jan Hubicka; +Cc: gcc-patches

On Fri, Jun 10, 2011 at 8:42 PM, Jan Hubicka <hubicka@ucw.cz> wrote:
> Hi,
> by some mistake we enable functions called once at -O0 and it actually happens from
> time to time.

Why do it for -O1?  It definitely makes debugging less reliable.  I'd say do it
for -O[23s] only.

Richard.

> Bootstrapped/regtested x86_64-linux, will commit it shortly.
>
> Honza
>
>        * opts.c (default_options): Enlist OPT_finline_functions_called_once.
>        * common.opt (flag_inline_functions_called_once):Do not initialize to 1.
> Index: opts.c
> ===================================================================
> --- opts.c      (revision 174916)
> +++ opts.c      (working copy)
> @@ -486,6 +486,7 @@ static const struct default_options defa
>     /* Inlining of functions reducing size is a good idea with -Os
>        regardless of them being declared inline.  */
>     { OPT_LEVELS_3_PLUS_AND_SIZE, OPT_finline_functions, NULL, 1 },
> +    { OPT_LEVELS_1_PLUS, OPT_finline_functions_called_once, NULL, 1 },
>     { OPT_LEVELS_3_PLUS, OPT_funswitch_loops, NULL, 1 },
>     { OPT_LEVELS_3_PLUS, OPT_fgcse_after_reload, NULL, 1 },
>     { OPT_LEVELS_3_PLUS, OPT_ftree_vectorize, NULL, 1 },
> Index: common.opt
> ===================================================================
> --- common.opt  (revision 174916)
> +++ common.opt  (working copy)
> @@ -1233,7 +1233,7 @@ Common Report Var(flag_inline_functions)
>  Integrate simple functions into their callers
>
>  finline-functions-called-once
> -Common Report Var(flag_inline_functions_called_once) Init(1) Optimization
> +Common Report Var(flag_inline_functions_called_once) Optimization
>  Integrate functions called once into their callers
>
>  finline-limit-
>

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

* Re: Cgraph alias reorg 13/14 (disable inlining functions called once at -O0
  2011-06-10 20:10 ` Richard Guenther
@ 2011-06-10 20:59   ` Jan Hubicka
  2011-06-12 10:56     ` Richard Guenther
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Hubicka @ 2011-06-10 20:59 UTC (permalink / raw)
  To: Richard Guenther; +Cc: Jan Hubicka, gcc-patches

> On Fri, Jun 10, 2011 at 8:42 PM, Jan Hubicka <hubicka@ucw.cz> wrote:
> > Hi,
> > by some mistake we enable functions called once at -O0 and it actually happens from
> > time to time.
> 
> Why do it for -O1?  It definitely makes debugging less reliable.  I'd say do it
> for -O[23s] only.

Well, that is what we did before.  I tought -O1 is mostly for optimizations
that are not too expensive and usually win (rahter than about debugability of
the output) and I think this one counts here.  But I don't have very strong
optinions either way.

Honza

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

* Re: Cgraph alias reorg 13/14 (disable inlining functions called once at -O0
  2011-06-10 20:59   ` Jan Hubicka
@ 2011-06-12 10:56     ` Richard Guenther
  2011-06-14 15:10       ` Eric Botcazou
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Guenther @ 2011-06-12 10:56 UTC (permalink / raw)
  To: Jan Hubicka; +Cc: gcc-patches

On Fri, Jun 10, 2011 at 9:15 PM, Jan Hubicka <hubicka@ucw.cz> wrote:
>> On Fri, Jun 10, 2011 at 8:42 PM, Jan Hubicka <hubicka@ucw.cz> wrote:
>> > Hi,
>> > by some mistake we enable functions called once at -O0 and it actually happens from
>> > time to time.
>>
>> Why do it for -O1?  It definitely makes debugging less reliable.  I'd say do it
>> for -O[23s] only.
>
> Well, that is what we did before.  I tought -O1 is mostly for optimizations
> that are not too expensive and usually win (rahter than about debugability of
> the output) and I think this one counts here.  But I don't have very strong
> optinions either way.

I think we also suggested at some point that -O1 optimizations
shouldn't interfere
with debugging too much.  But if it is what we did before it's certainly fine.

Richard.

> Honza
>

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

* Re: Cgraph alias reorg 13/14 (disable inlining functions called once at -O0
  2011-06-12 10:56     ` Richard Guenther
@ 2011-06-14 15:10       ` Eric Botcazou
  0 siblings, 0 replies; 5+ messages in thread
From: Eric Botcazou @ 2011-06-14 15:10 UTC (permalink / raw)
  To: Richard Guenther; +Cc: gcc-patches, Jan Hubicka

> I think we also suggested at some point that -O1 optimizations
> shouldn't interfere with debugging too much.  But if it is what we did before
> it's certainly fine.

FWIW we have some evidences that -finline-functions-called-once really help 
at -O1 in terms of performances (with the 4.5 back-end) and doesn't damage 
debugging too much.

-- 
Eric Botcazou

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

end of thread, other threads:[~2011-06-14 15:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-10 18:47 Cgraph alias reorg 13/14 (disable inlining functions called once at -O0 Jan Hubicka
2011-06-10 20:10 ` Richard Guenther
2011-06-10 20:59   ` Jan Hubicka
2011-06-12 10:56     ` Richard Guenther
2011-06-14 15:10       ` Eric Botcazou

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