public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* undocumented optimization options
@ 2007-11-01 17:08 Janis Johnson
  2007-11-03 17:22 ` Gerald Pfeifer
  2007-11-03 20:41 ` Steven Bosscher
  0 siblings, 2 replies; 16+ messages in thread
From: Janis Johnson @ 2007-11-01 17:08 UTC (permalink / raw)
  To: gcc; +Cc: zadeck, razya, ctice, stevenb.gcc

Several options reported by --help=optimize are not documented in the
GCC Manual (via invoke.texi) but are still reported with
--help=optimize,^undocumented.  Here are the options along with the
people who checked in the entries to common.opt:

  -fipa-cp               steven
  -fipa-matrix-reorg     razya
  -fipa-pure-const       zadeck  (enabled with -O)
  -fipa-reference        zadeck  (enabled with -O)
  -fipa-type-escape      zadeck
  -fvar-tracking-uninit  ctice

Is there a policy about whether an experimental option can be left
undocumented, or should it be documented with a statement that it is
experimental?

If an option is left undocumented on purpose then its entry in common.opt
should include "Undocumented".

Janis


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

* Re: undocumented optimization options
  2007-11-01 17:08 undocumented optimization options Janis Johnson
@ 2007-11-03 17:22 ` Gerald Pfeifer
  2007-11-05  3:32   ` Mark Mitchell
  2007-11-03 20:41 ` Steven Bosscher
  1 sibling, 1 reply; 16+ messages in thread
From: Gerald Pfeifer @ 2007-11-03 17:22 UTC (permalink / raw)
  To: Janis Johnson; +Cc: gcc, zadeck, razya, ctice, stevenb.gcc

On Thu, 1 Nov 2007, Janis Johnson wrote:
>   -fipa-cp               steven
>   -fipa-matrix-reorg     razya
>   -fipa-pure-const       zadeck  (enabled with -O)
>   -fipa-reference        zadeck  (enabled with -O)
>   -fipa-type-escape      zadeck
>   -fvar-tracking-uninit  ctice
> 
> Is there a policy about whether an experimental option can be left
> undocumented, or should it be documented with a statement that it is
> experimental?

I'd prefer the latter.  And for options enabled by default or via one
of the commonly used options (such as -O) I believe we should always
include documentation _or_ we might want to remove those options and
make the associated active unconditionally.

> If an option is left undocumented on purpose then its entry in 
> common.opt should include "Undocumented".

So far we don't seem to use that in common.opt.

Gerald

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

* Re: undocumented optimization options
  2007-11-01 17:08 undocumented optimization options Janis Johnson
  2007-11-03 17:22 ` Gerald Pfeifer
@ 2007-11-03 20:41 ` Steven Bosscher
  2007-11-03 22:28   ` Steven Bosscher
  1 sibling, 1 reply; 16+ messages in thread
From: Steven Bosscher @ 2007-11-03 20:41 UTC (permalink / raw)
  To: janis187; +Cc: gcc, zadeck, razya, ctice

On 11/1/07, Janis Johnson <janis187@us.ibm.com> wrote:
> Several options reported by --help=optimize are not documented in the
> GCC Manual (via invoke.texi) but are still reported with
> --help=optimize,^undocumented.  Here are the options along with the
> people who checked in the entries to common.opt:
>
>   -fipa-cp               steven

I may have moved it around, I don't recall. But I did not add this option.
Gr.
Steven

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

* Re: undocumented optimization options
  2007-11-03 20:41 ` Steven Bosscher
@ 2007-11-03 22:28   ` Steven Bosscher
  0 siblings, 0 replies; 16+ messages in thread
From: Steven Bosscher @ 2007-11-03 22:28 UTC (permalink / raw)
  To: janis187; +Cc: gcc, zadeck, razya, ctice

On 11/1/07, Janis Johnson <janis187@us.ibm.com> wrote:
> Several options reported by --help=optimize are not documented in the
> GCC Manual (via invoke.texi) but are still reported with
> --help=optimize,^undocumented.  Here are the options along with the
> people who checked in the entries to common.opt:
>
>   -fipa-cp               steven

I may have moved it around, I don't recall. But I did not add this option.
Gr.
Steven

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

* Re: undocumented optimization options
  2007-11-03 17:22 ` Gerald Pfeifer
@ 2007-11-05  3:32   ` Mark Mitchell
  2007-11-07 17:48     ` Razya Ladelsky
  0 siblings, 1 reply; 16+ messages in thread
From: Mark Mitchell @ 2007-11-05  3:32 UTC (permalink / raw)
  To: Gerald Pfeifer; +Cc: Janis Johnson, gcc, zadeck, razya, ctice, stevenb.gcc

Gerald Pfeifer wrote:
> On Thu, 1 Nov 2007, Janis Johnson wrote:
>>   -fipa-cp               steven
>>   -fipa-matrix-reorg     razya
>>   -fipa-pure-const       zadeck  (enabled with -O)
>>   -fipa-reference        zadeck  (enabled with -O)
>>   -fipa-type-escape      zadeck
>>   -fvar-tracking-uninit  ctice
>>
>> Is there a policy about whether an experimental option can be left
>> undocumented, or should it be documented with a statement that it is
>> experimental?
> 
> I'd prefer the latter. 

I believe our policy to be that *all* command line options must be
clearly documented.  The document can say that the option is
experimental, deprecated, or otherwise in danger of being removed or
changes, but we should document the option.

If an option is only useful for developers, and we really think that
users should not be allowed to twiddle it, we should hide it under an
#ifdef.

Thanks,

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713

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

* Re: undocumented optimization options
  2007-11-05  3:32   ` Mark Mitchell
@ 2007-11-07 17:48     ` Razya Ladelsky
  2007-11-07 17:52       ` Kenneth Zadeck
  0 siblings, 1 reply; 16+ messages in thread
From: Razya Ladelsky @ 2007-11-07 17:48 UTC (permalink / raw)
  To: Mark Mitchell
  Cc: ctice, gcc, Gerald Pfeifer, Janis Johnson, stevenb.gcc, zadeck

Mark Mitchell <mark@codesourcery.com> wrote on 05/11/2007 01:51:33:

> Gerald Pfeifer wrote:
> > On Thu, 1 Nov 2007, Janis Johnson wrote:
> >>   -fipa-cp               steven
> >>   -fipa-matrix-reorg     razya
> >>   -fipa-pure-const       zadeck  (enabled with -O)
> >>   -fipa-reference        zadeck  (enabled with -O)
> >>   -fipa-type-escape      zadeck
> >>   -fvar-tracking-uninit  ctice
> >>

I'll add documentation for ipa-cp and ipa-matrix-reorg as soon as 
Zadeck commits his changes to invoke.texi.

Thanks,
Razya


> >> Is there a policy about whether an experimental option can be left
> >> undocumented, or should it be documented with a statement that it is
> >> experimental?
> > 
> > I'd prefer the latter. 
> 
> I believe our policy to be that *all* command line options must be
> clearly documented.  The document can say that the option is
> experimental, deprecated, or otherwise in danger of being removed or
> changes, but we should document the option.
> 
> If an option is only useful for developers, and we really think that
> users should not be allowed to twiddle it, we should hide it under an
> #ifdef.
> 
> Thanks,
> 
> -- 
> Mark Mitchell
> CodeSourcery
> mark@codesourcery.com
> (650) 331-3385 x713

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

* Re: undocumented optimization options
  2007-11-07 17:48     ` Razya Ladelsky
@ 2007-11-07 17:52       ` Kenneth Zadeck
  2007-11-12 13:46         ` Razya Ladelsky
  0 siblings, 1 reply; 16+ messages in thread
From: Kenneth Zadeck @ 2007-11-07 17:52 UTC (permalink / raw)
  To: Razya Ladelsky
  Cc: Mark Mitchell, ctice, gcc, Gerald Pfeifer, Janis Johnson, stevenb.gcc

Razya Ladelsky wrote:
> Mark Mitchell <mark@codesourcery.com> wrote on 05/11/2007 01:51:33:
>
>   
>> Gerald Pfeifer wrote:
>>     
>>> On Thu, 1 Nov 2007, Janis Johnson wrote:
>>>       
>>>>   -fipa-cp               steven
>>>>   -fipa-matrix-reorg     razya
>>>>   -fipa-pure-const       zadeck  (enabled with -O)
>>>>   -fipa-reference        zadeck  (enabled with -O)
>>>>   -fipa-type-escape      zadeck
>>>>   -fvar-tracking-uninit  ctice
>>>>
>>>>         
>
> I'll add documentation for ipa-cp and ipa-matrix-reorg as soon as 
> Zadeck commits his changes to invoke.texi.
>
> Thanks,
> Razya
>
>
>   
>>>> Is there a policy about whether an experimental option can be left
>>>> undocumented, or should it be documented with a statement that it is
>>>> experimental?
>>>>         
>>> I'd prefer the latter. 
>>>       
>> I believe our policy to be that *all* command line options must be
>> clearly documented.  The document can say that the option is
>> experimental, deprecated, or otherwise in danger of being removed or
>> changes, but we should document the option.
>>
>> If an option is only useful for developers, and we really think that
>> users should not be allowed to twiddle it, we should hide it under an
>> #ifdef.
>>
>> Thanks,
>>
>> -- 
>> Mark Mitchell
>> CodeSourcery
>> mark@codesourcery.com
>> (650) 331-3385 x713
>>     
>
>   
i am waiting for an approval, hint hint hint.

Kenny

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

* Re: undocumented optimization options
  2007-11-07 17:52       ` Kenneth Zadeck
@ 2007-11-12 13:46         ` Razya Ladelsky
  2007-11-12 14:04           ` Richard Guenther
  2007-11-13 20:02           ` Ian Lance Taylor
  0 siblings, 2 replies; 16+ messages in thread
From: Razya Ladelsky @ 2007-11-12 13:46 UTC (permalink / raw)
  To: gcc-patches
  Cc: ctice, gcc, Gerald Pfeifer, Janis Johnson, Mark Mitchell,
	stevenb.gcc, Kenneth Zadeck

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

Kenneth Zadeck <zadeck@naturalbridge.com> wrote on 07/11/2007 19:49:29:

> Razya Ladelsky wrote:
> > Mark Mitchell <mark@codesourcery.com> wrote on 05/11/2007 01:51:33:
> >
> > 
> >> Gerald Pfeifer wrote:
> >> 
> >>> On Thu, 1 Nov 2007, Janis Johnson wrote:
> >>> 
> >>>>   -fipa-cp               steven
> >>>>   -fipa-matrix-reorg     razya
> >>>>   -fipa-pure-const       zadeck  (enabled with -O)
> >>>>   -fipa-reference        zadeck  (enabled with -O)
> >>>>   -fipa-type-escape      zadeck
> >>>>   -fvar-tracking-uninit  ctice
> >>>>
> >>>> 
> >
> > I'll add documentation for fipa-cp and fipa-matrix-reorg as soon as 
> > Zadeck commits his changes to invoke.texi.
> >
> > Thanks,
> > Razya
> >
> >

Hi,

This patch adds documentation for fipa-cp and -fipa-matrix-reorg.

2007-11-12  Razya Ladelsky <razya@il.ibm.com>

    * doc/invoke.texi (fipa-cp, fipa-matrix-reorg): Add documentation.

Ok to commit?



[-- Attachment #2: document.diff --]
[-- Type: application/octet-stream, Size: 1141 bytes --]

Index: doc/invoke.texi
===================================================================
--- doc/invoke.texi	(revision 130095)
+++ doc/invoke.texi	(working copy)
@@ -328,7 +328,8 @@
 -ffunction-sections -fgcse -fgcse-after-reload -fgcse-las -fgcse-lm @gol
 -fgcse-sm -fif-conversion -fif-conversion2 -finline-functions @gol
 -finline-functions-called-once -finline-limit=@var{n} @gol
--finline-small-functions -fipa-pta -fipa-pure-const -fipa-reference @gol
+-finline-small-functions -fipa-cp -fipa-marix-reorg -fipa-pta @gol 
+-fipa-pure-const -fipa-reference @gol
 -fipa-type-escape -fivopts -fkeep-inline-functions -fkeep-static-consts @gol
 -fmerge-all-constants -fmerge-constants -fmodulo-sched @gol
 -fmodulo-sched-allow-regmoves -fmove-loop-invariants -fmudflap @gol
@@ -5714,6 +5715,14 @@
 @opindex fipa-pta
 Perform interprocedural pointer analysis.
 
+@item -fipa-cp
+@opindex fipa-cp
+Perform interprocedural constant propagation.
+
+@item -fipa-matrix-reorg
+@opindex fipa-matrix-reorg
+Perform matrix flattening and transposing.
+
 @item -ftree-sink
 @opindex ftree-sink
 Perform forward store motion  on trees.  This flag is

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

* Re: undocumented optimization options
  2007-11-12 13:46         ` Razya Ladelsky
@ 2007-11-12 14:04           ` Richard Guenther
  2007-11-12 16:06             ` Razya Ladelsky
  2007-11-13 20:02           ` Ian Lance Taylor
  1 sibling, 1 reply; 16+ messages in thread
From: Richard Guenther @ 2007-11-12 14:04 UTC (permalink / raw)
  To: Razya Ladelsky
  Cc: gcc-patches, ctice, gcc, Gerald Pfeifer, Janis Johnson,
	Mark Mitchell, stevenb.gcc, Kenneth Zadeck

On Nov 12, 2007 10:06 AM, Razya Ladelsky <RAZYA@il.ibm.com> wrote:
> Kenneth Zadeck <zadeck@naturalbridge.com> wrote on 07/11/2007 19:49:29:
>
> > Razya Ladelsky wrote:
> > > Mark Mitchell <mark@codesourcery.com> wrote on 05/11/2007 01:51:33:
> > >
> > >
> > >> Gerald Pfeifer wrote:
> > >>
> > >>> On Thu, 1 Nov 2007, Janis Johnson wrote:
> > >>>
> > >>>>   -fipa-cp               steven
> > >>>>   -fipa-matrix-reorg     razya
> > >>>>   -fipa-pure-const       zadeck  (enabled with -O)
> > >>>>   -fipa-reference        zadeck  (enabled with -O)
> > >>>>   -fipa-type-escape      zadeck
> > >>>>   -fvar-tracking-uninit  ctice
> > >>>>
> > >>>>
> > >
> > > I'll add documentation for fipa-cp and fipa-matrix-reorg as soon as
> > > Zadeck commits his changes to invoke.texi.
> > >
> > > Thanks,
> > > Razya
> > >
> > >
>
> Hi,
>
> This patch adds documentation for fipa-cp and -fipa-matrix-reorg.
>
> 2007-11-12  Razya Ladelsky <razya@il.ibm.com>
>
>     * doc/invoke.texi (fipa-cp, fipa-matrix-reorg): Add documentation.
>
> Ok to commit?

Please be more verbose.  While people might have an idea what interprocedural
constant propagation is (though they probably don't immediately see that it
might increase code-size by versioning functions), certainly matrix flattening
deserves more comments.

Of course we might stay with the sparse documentation and just say in
addition "This optimization is experimental." to steer people away from it ;)

Richard.

For reference here's part of the patch:

@@ -5714,6 +5715,14 @@
 @opindex fipa-pta
 Perform interprocedural pointer analysis.

+@item -fipa-cp
+@opindex fipa-cp
+Perform interprocedural constant propagation.
+
+@item -fipa-matrix-reorg
+@opindex fipa-matrix-reorg
+Perform matrix flattening and transposing.
+

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

* Re: undocumented optimization options
  2007-11-12 14:04           ` Richard Guenther
@ 2007-11-12 16:06             ` Razya Ladelsky
  2007-11-12 16:07               ` Richard Guenther
  0 siblings, 1 reply; 16+ messages in thread
From: Razya Ladelsky @ 2007-11-12 16:06 UTC (permalink / raw)
  To: Richard Guenther
  Cc: ctice, gcc, gcc-patches, Gerald Pfeifer, Janis Johnson,
	Mark Mitchell, stevenb.gcc, Kenneth Zadeck

"Richard Guenther" <richard.guenther@gmail.com> wrote on 12/11/2007 
12:28:05:

> On Nov 12, 2007 10:06 AM, Razya Ladelsky <RAZYA@il.ibm.com> wrote:
> > Kenneth Zadeck <zadeck@naturalbridge.com> wrote on 07/11/2007 
19:49:29:
> >
> > > Razya Ladelsky wrote:
> > > > Mark Mitchell <mark@codesourcery.com> wrote on 05/11/2007 
01:51:33:
> > > >
> > > >
> > > >> Gerald Pfeifer wrote:
> > > >>
> > > >>> On Thu, 1 Nov 2007, Janis Johnson wrote:
> > > >>>
> > > >>>>   -fipa-cp               steven
> > > >>>>   -fipa-matrix-reorg     razya
> > > >>>>   -fipa-pure-const       zadeck  (enabled with -O)
> > > >>>>   -fipa-reference        zadeck  (enabled with -O)
> > > >>>>   -fipa-type-escape      zadeck
> > > >>>>   -fvar-tracking-uninit  ctice
> > > >>>>
> > > >>>>
> > > >
> > > > I'll add documentation for fipa-cp and fipa-matrix-reorg as soon 
as
> > > > Zadeck commits his changes to invoke.texi.
> > > >
> > > > Thanks,
> > > > Razya
> > > >
> > > >
> >
> > Hi,
> >
> > This patch adds documentation for fipa-cp and -fipa-matrix-reorg.
> >
> > 2007-11-12  Razya Ladelsky <razya@il.ibm.com>
> >
> >     * doc/invoke.texi (fipa-cp, fipa-matrix-reorg): Add documentation.
> >
> > Ok to commit?
> 
> Please be more verbose.  While people might have an idea what 
interprocedural
> constant propagation is (though they probably don't immediately see that 
it
> might increase code-size by versioning functions), certainly matrix 
flattening
> deserves more comments.
> 

I was under the impression that in invoke.texi we just document the 
options.
The optimizations' full documentation is at the corresponding files.
(ipa-cp.c and matrix-reorg.c)
Do you think a more detailed description of these optimizations 
in doc/invoke.texi is necessary?

Thanks,
Razya


> Of course we might stay with the sparse documentation and just say in
> addition "This optimization is experimental." to steer people away from 
it ;)
> 
> Richard.
> 
> For reference here's part of the patch:
> 
> @@ -5714,6 +5715,14 @@
>  @opindex fipa-pta
>  Perform interprocedural pointer analysis.
> 
> +@item -fipa-cp
> +@opindex fipa-cp
> +Perform interprocedural constant propagation.
> +
> +@item -fipa-matrix-reorg
> +@opindex fipa-matrix-reorg
> +Perform matrix flattening and transposing.
> +

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

* Re: undocumented optimization options
  2007-11-12 16:06             ` Razya Ladelsky
@ 2007-11-12 16:07               ` Richard Guenther
  2007-11-12 17:54                 ` Mark Mitchell
  0 siblings, 1 reply; 16+ messages in thread
From: Richard Guenther @ 2007-11-12 16:07 UTC (permalink / raw)
  To: Razya Ladelsky
  Cc: ctice, gcc, gcc-patches, Gerald Pfeifer, Janis Johnson,
	Mark Mitchell, stevenb.gcc, Kenneth Zadeck

On Nov 12, 2007 3:27 PM, Razya Ladelsky <RAZYA@il.ibm.com> wrote:
> "Richard Guenther" <richard.guenther@gmail.com> wrote on 12/11/2007
> 12:28:05:
>
>
> > On Nov 12, 2007 10:06 AM, Razya Ladelsky <RAZYA@il.ibm.com> wrote:
> > > Kenneth Zadeck <zadeck@naturalbridge.com> wrote on 07/11/2007
> 19:49:29:
> > >
> > > > Razya Ladelsky wrote:
> > > > > Mark Mitchell <mark@codesourcery.com> wrote on 05/11/2007
> 01:51:33:
> > > > >
> > > > >
> > > > >> Gerald Pfeifer wrote:
> > > > >>
> > > > >>> On Thu, 1 Nov 2007, Janis Johnson wrote:
> > > > >>>
> > > > >>>>   -fipa-cp               steven
> > > > >>>>   -fipa-matrix-reorg     razya
> > > > >>>>   -fipa-pure-const       zadeck  (enabled with -O)
> > > > >>>>   -fipa-reference        zadeck  (enabled with -O)
> > > > >>>>   -fipa-type-escape      zadeck
> > > > >>>>   -fvar-tracking-uninit  ctice
> > > > >>>>
> > > > >>>>
> > > > >
> > > > > I'll add documentation for fipa-cp and fipa-matrix-reorg as soon
> as
> > > > > Zadeck commits his changes to invoke.texi.
> > > > >
> > > > > Thanks,
> > > > > Razya
> > > > >
> > > > >
> > >
> > > Hi,
> > >
> > > This patch adds documentation for fipa-cp and -fipa-matrix-reorg.
> > >
> > > 2007-11-12  Razya Ladelsky <razya@il.ibm.com>
> > >
> > >     * doc/invoke.texi (fipa-cp, fipa-matrix-reorg): Add documentation.
> > >
> > > Ok to commit?
> >
> > Please be more verbose.  While people might have an idea what
> interprocedural
> > constant propagation is (though they probably don't immediately see that
> it
> > might increase code-size by versioning functions), certainly matrix
> flattening
> > deserves more comments.
> >
>
> I was under the impression that in invoke.texi we just document the
> options.
> The optimizations' full documentation is at the corresponding files.
> (ipa-cp.c and matrix-reorg.c)
> Do you think a more detailed description of these optimizations
> in doc/invoke.texi is necessary?

For options that are not enabled by default at any -O level the documentation
should be a help for the user to decide whether to enable or not enable it.
So, yes, if there are non-standard terms used or if there are not obvious
side-effects (like performing function versioning for ipa-cp) those should be
documented.

For example googling for "interprocedural constant propagation" gives you
an idea what it does by citing papers.  Googling for "matrix flattening
transposing" instead gives you only patches ;)

Richard.

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

* Re: undocumented optimization options
  2007-11-12 16:07               ` Richard Guenther
@ 2007-11-12 17:54                 ` Mark Mitchell
  2007-11-21 18:04                   ` Razya Ladelsky
  0 siblings, 1 reply; 16+ messages in thread
From: Mark Mitchell @ 2007-11-12 17:54 UTC (permalink / raw)
  To: Richard Guenther
  Cc: Razya Ladelsky, ctice, gcc, gcc-patches, Gerald Pfeifer,
	Janis Johnson, stevenb.gcc, Kenneth Zadeck

Richard Guenther wrote:

> For options that are not enabled by default at any -O level the documentation
> should be a help for the user to decide whether to enable or not enable it.
> So, yes, if there are non-standard terms used or if there are not obvious
> side-effects (like performing function versioning for ipa-cp) those should be
> documented.
> 
> For example googling for "interprocedural constant propagation" gives you
> an idea what it does by citing papers.  Googling for "matrix flattening
> transposing" instead gives you only patches ;)

To echo Richard: this is a user manual, so we don't need to say exactly
what the option does, but we have to say when you should use it. :-)  In
other words, we certainly don't want to say anything about SSA names or
whatever, but we do want to explain what it's for.  For interprocedural
constant propagation, maybe something like:

==
This optimization analyzes the program to determine when values passed
to, or return from, functions are constants and then optimizes
accordingly.  This optimization can substantially increase performance
if the application has lots of functions that return constants, but,
because this optimization can create multiple copies of code fragments,
it may significantly increase code size.
==

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713

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

* Re: undocumented optimization options
  2007-11-12 13:46         ` Razya Ladelsky
  2007-11-12 14:04           ` Richard Guenther
@ 2007-11-13 20:02           ` Ian Lance Taylor
  2007-11-15 19:35             ` Razya Ladelsky
  1 sibling, 1 reply; 16+ messages in thread
From: Ian Lance Taylor @ 2007-11-13 20:02 UTC (permalink / raw)
  To: Razya Ladelsky
  Cc: gcc-patches, ctice, gcc, Gerald Pfeifer, Janis Johnson,
	Mark Mitchell, stevenb.gcc, Kenneth Zadeck

Razya Ladelsky <RAZYA@il.ibm.com> writes:

> This patch adds documentation for fipa-cp and -fipa-matrix-reorg.
> 
> 2007-11-12  Razya Ladelsky <razya@il.ibm.com>
> 
>     * doc/invoke.texi (fipa-cp, fipa-matrix-reorg): Add documentation.
> 
> Ok to commit?

This is OK.

Thanks.

Ian

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

* Re: undocumented optimization options
  2007-11-13 20:02           ` Ian Lance Taylor
@ 2007-11-15 19:35             ` Razya Ladelsky
  0 siblings, 0 replies; 16+ messages in thread
From: Razya Ladelsky @ 2007-11-15 19:35 UTC (permalink / raw)
  To: Ian Lance Taylor
  Cc: ctice, gcc, gcc-patches, Gerald Pfeifer, Janis Johnson,
	Mark Mitchell, stevenb.gcc, Kenneth Zadeck

Ian Lance Taylor <iant@google.com> wrote on 13/11/2007 20:11:35:

> Razya Ladelsky <RAZYA@il.ibm.com> writes:
> 
> > This patch adds documentation for fipa-cp and -fipa-matrix-reorg.
> > 
> > 2007-11-12  Razya Ladelsky <razya@il.ibm.com>
> > 
> >     * doc/invoke.texi (fipa-cp, fipa-matrix-reorg): Add documentation.
> > 
> > Ok to commit?
> 
> This is OK.
> 

Should I add a more detailed documentation for 
these optimizations, though?

Thanks,
Razya

> Thanks.
> 
> Ian

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

* Re: undocumented optimization options
  2007-11-12 17:54                 ` Mark Mitchell
@ 2007-11-21 18:04                   ` Razya Ladelsky
  2007-11-21 20:56                     ` Richard Guenther
  0 siblings, 1 reply; 16+ messages in thread
From: Razya Ladelsky @ 2007-11-21 18:04 UTC (permalink / raw)
  To: Mark Mitchell
  Cc: ctice, gcc, gcc-patches, Gerald Pfeifer, Janis Johnson,
	Richard Guenther, stevenb.gcc, Kenneth Zadeck

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

Mark Mitchell <mark@codesourcery.com> wrote on 12/11/2007 18:25:03:

> Richard Guenther wrote:
> 
> > For options that are not enabled by default at any -O level the 
> documentation
> > should be a help for the user to decide whether to enable or not 
enable it.
> > So, yes, if there are non-standard terms used or if there are not 
obvious
> > side-effects (like performing function versioning for ipa-cp) 
> those should be
> > documented.
> > 
> > For example googling for "interprocedural constant propagation" gives 
you
> > an idea what it does by citing papers.  Googling for "matrix 
flattening
> > transposing" instead gives you only patches ;)
> 
> To echo Richard: this is a user manual, so we don't need to say exactly
> what the option does, but we have to say when you should use it. :-)  In
> other words, we certainly don't want to say anything about SSA names or
> whatever, but we do want to explain what it's for.  For interprocedural
> constant propagation, maybe something like:
> 
> ==
> This optimization analyzes the program to determine when values passed
> to, or return from, functions are constants and then optimizes
> accordingly.  This optimization can substantially increase performance
> if the application has lots of functions that return constants, but,
> because this optimization can create multiple copies of code fragments,
> it may significantly increase code size.
> ==
> 

Thanks.
Described these two optimizations in more detail.
O.K now?

Thanks,
Razya

2007-11-20  Razya Ladelsky <razya@il.ibm.com>

    * doc/invoke.texi (fipa-cp, fipa-matrix-reorg): Add documentation.






> -- 
> Mark Mitchell
> CodeSourcery
> mark@codesourcery.com
> (650) 331-3385 x713

[-- Attachment #2: document.txt --]
[-- Type: text/plain, Size: 2001 bytes --]

Index: invoke.texi
===================================================================
--- invoke.texi	(revision 130311)
+++ invoke.texi	(working copy)
@@ -328,7 +328,8 @@
 -ffunction-sections -fgcse -fgcse-after-reload -fgcse-las -fgcse-lm @gol
 -fgcse-sm -fif-conversion -fif-conversion2 -finline-functions @gol
 -finline-functions-called-once -finline-limit=@var{n} @gol
--finline-small-functions -fipa-pta -fipa-pure-const -fipa-reference @gol
+-finline-small-functions -fipa-cp -fipa-marix-reorg -fipa-pta @gol 
+-fipa-pure-const -fipa-reference @gol
 -fipa-type-escape -fivopts -fkeep-inline-functions -fkeep-static-consts @gol
 -fmerge-all-constants -fmerge-constants -fmodulo-sched @gol
 -fmodulo-sched-allow-regmoves -fmove-loop-invariants -fmudflap @gol
@@ -5715,6 +5716,29 @@
 @opindex fipa-pta
 Perform interprocedural pointer analysis.
 
+@item -fipa-cp
+@opindex fipa-cp
+Perform interprocedural constant propagation.
+This optimization analyzes the program to determine when values passed
+to functions are constants and then optimizes accordingly.  
+This optimization can substantially increase performance
+if the application has constants passed to functions, but
+because this optimization can create multiple copies of functions,
+it may significantly increase code size.
+
+@item -fipa-matrix-reorg
+@opindex fipa-matrix-reorg
+Perform matrix flattening and transposing.
+Matrix flattening tries to replace a m-dimensional matrix 
+with its equivalent n-dimensional matrix, where n < m.
+This reduces the level of indirection needed for accessing the elements
+of the matrix. The second optimization is matrix transposing that
+attemps to change the order of the matrix's dimensions in order to 
+improve cache locality.
+Both optimizations need fwhole-program flag. 
+Transpoing is enabled only if profiling information is avaliable.
+
+
 @item -ftree-sink
 @opindex ftree-sink
 Perform forward store motion  on trees.  This flag is
=

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

* Re: undocumented optimization options
  2007-11-21 18:04                   ` Razya Ladelsky
@ 2007-11-21 20:56                     ` Richard Guenther
  0 siblings, 0 replies; 16+ messages in thread
From: Richard Guenther @ 2007-11-21 20:56 UTC (permalink / raw)
  To: Razya Ladelsky
  Cc: Mark Mitchell, ctice, gcc, gcc-patches, Gerald Pfeifer,
	Janis Johnson, stevenb.gcc, Kenneth Zadeck

On Nov 20, 2007 12:32 PM, Razya Ladelsky <RAZYA@il.ibm.com> wrote:
> Mark Mitchell <mark@codesourcery.com> wrote on 12/11/2007 18:25:03:
>
>
> > Richard Guenther wrote:
> >
> > > For options that are not enabled by default at any -O level the
> > documentation
> > > should be a help for the user to decide whether to enable or not
> enable it.
> > > So, yes, if there are non-standard terms used or if there are not
> obvious
> > > side-effects (like performing function versioning for ipa-cp)
> > those should be
> > > documented.
> > >
> > > For example googling for "interprocedural constant propagation" gives
> you
> > > an idea what it does by citing papers.  Googling for "matrix
> flattening
> > > transposing" instead gives you only patches ;)
> >
> > To echo Richard: this is a user manual, so we don't need to say exactly
> > what the option does, but we have to say when you should use it. :-)  In
> > other words, we certainly don't want to say anything about SSA names or
> > whatever, but we do want to explain what it's for.  For interprocedural
> > constant propagation, maybe something like:
> >
> > ==
> > This optimization analyzes the program to determine when values passed
> > to, or return from, functions are constants and then optimizes
> > accordingly.  This optimization can substantially increase performance
> > if the application has lots of functions that return constants, but,
> > because this optimization can create multiple copies of code fragments,
> > it may significantly increase code size.
> > ==
> >
>
> Thanks.
> Described these two optimizations in more detail.
> O.K now?

Ok.  Thanks!
Richard.

> Thanks,
> Razya
>
> 2007-11-20  Razya Ladelsky <razya@il.ibm.com>
>
>     * doc/invoke.texi (fipa-cp, fipa-matrix-reorg): Add documentation.

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

end of thread, other threads:[~2007-11-20 12:52 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-01 17:08 undocumented optimization options Janis Johnson
2007-11-03 17:22 ` Gerald Pfeifer
2007-11-05  3:32   ` Mark Mitchell
2007-11-07 17:48     ` Razya Ladelsky
2007-11-07 17:52       ` Kenneth Zadeck
2007-11-12 13:46         ` Razya Ladelsky
2007-11-12 14:04           ` Richard Guenther
2007-11-12 16:06             ` Razya Ladelsky
2007-11-12 16:07               ` Richard Guenther
2007-11-12 17:54                 ` Mark Mitchell
2007-11-21 18:04                   ` Razya Ladelsky
2007-11-21 20:56                     ` Richard Guenther
2007-11-13 20:02           ` Ian Lance Taylor
2007-11-15 19:35             ` Razya Ladelsky
2007-11-03 20:41 ` Steven Bosscher
2007-11-03 22:28   ` Steven Bosscher

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