This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, pretty-ipa merge 2/4] New option and timevar.


On Wed, 24 Jun 2009, Martin Jambor wrote:

> Hi,
> 
> this patch adds an option for IPA-SRA, its description in the user
> manual and a new timevar for the pass.

Why is this "early-ipa-sra" and not ipa-sra?  I think the user
shouldn't need to care and if he should then the difference between
early ipa-sra and non-early ipa-sra needs to be explained.

Thanks,
Richard.

> Thanks,
> 
> Martin
> 
> 
> 
> 2009-06-23  Martin Jambor  <mjambor@suse.cz>
> 
> 	* common.opt (fearly-ipa-sra): New switch.
> 	* opts.c (decode_options): Turn flag_early_ipa_sra on for opt2.
> 	* timevar.def (TV_IPA_SRA): New timevar.
> 	* doc/invoke.texi: Document -fearly-ipa-sra.
> 
> 
> Index: mine/gcc/common.opt
> ===================================================================
> --- mine.orig/gcc/common.opt
> +++ mine/gcc/common.opt
> @@ -486,6 +486,10 @@ feliminate-dwarf2-dups
>  Common Report Var(flag_eliminate_dwarf2_dups)
>  Perform DWARF2 duplicate elimination
>  
> +fearly-ipa-sra
> +Common Report Var(flag_early_ipa_sra) Init(0) Optimization
> +Perform early interprocedural reduction of aggregates
> +
>  feliminate-unused-debug-symbols
>  Common Report Var(flag_debug_only_used_symbols)
>  Perform unused type elimination in debug info
> Index: mine/gcc/opts.c
> ===================================================================
> --- mine.orig/gcc/opts.c
> +++ mine/gcc/opts.c
> @@ -894,6 +894,7 @@ decode_options (unsigned int argc, const
>    flag_tree_pre = opt2;
>    flag_tree_switch_conversion = 1;
>    flag_ipa_cp = opt2;
> +  flag_early_ipa_sra = opt2;
>  
>    /* Track fields in field-sensitive alias analysis.  */
>    set_param_value ("max-fields-for-field-sensitive",
> Index: mine/gcc/timevar.def
> ===================================================================
> --- mine.orig/gcc/timevar.def
> +++ mine/gcc/timevar.def
> @@ -46,6 +46,7 @@ DEFTIMEVAR (TV_IPA_REFERENCE         , "
>  DEFTIMEVAR (TV_IPA_PURE_CONST        , "ipa pure const")
>  DEFTIMEVAR (TV_IPA_TYPE_ESCAPE       , "ipa type escape")
>  DEFTIMEVAR (TV_IPA_PTA               , "ipa points-to")
> +DEFTIMEVAR (TV_IPA_SRA               , "ipa SRA")
>  /* Time spent by constructing CFG.  */
>  DEFTIMEVAR (TV_CFG                   , "cfg construction")
>  /* Time spent by cleaning up CFG.  */
> Index: mine/gcc/doc/invoke.texi
> ===================================================================
> --- mine.orig/gcc/doc/invoke.texi
> +++ mine/gcc/doc/invoke.texi
> @@ -333,7 +333,7 @@ Objective-C and Objective-C++ Dialects}.
>  -fcse-follow-jumps -fcse-skip-blocks -fcx-fortran-rules -fcx-limited-range @gol
>  -fdata-sections -fdce -fdce @gol
>  -fdelayed-branch -fdelete-null-pointer-checks -fdse -fdse @gol
> --fearly-inlining -fexpensive-optimizations -ffast-math @gol
> +-fearly-inlining -fearly-ipa-sra -fexpensive-optimizations -ffast-math @gol
>  -ffinite-math-only -ffloat-store -fexcess-precision=@var{style} @gol
>  -fforward-propagate -ffunction-sections @gol
>  -fgcse -fgcse-after-reload -fgcse-las -fgcse-lm @gol
> @@ -5599,6 +5599,7 @@ also turns on the following optimization
>  -fexpensive-optimizations @gol
>  -fgcse  -fgcse-lm  @gol
>  -findirect-inlining @gol
> +-fearly-ipa-sra @gol
>  -foptimize-sibling-calls @gol
>  -fpeephole2 @gol
>  -fregmove @gol
> @@ -5759,6 +5760,16 @@ having large chains of nested wrapper fu
>  
>  Enabled by default.
>  
> +@item -fearly-ipa-sra
> +@opindex fearly-ipa-sra
> +Perform early interprocedural scalar replacement of aggregates and other
> +forms of call regularization.  This will change parameters of local
> +functions when deemed profitable by passing arguments by value instead
> +by reference, passing only a part of an aggregate or removing an
> +unused argument altogether.
> +
> +Enabled at levels @option{-O2}, @option{-O3} and @option{-Os}.
> +
>  @item -finline-limit=@var{n}
>  @opindex finline-limit
>  By default, GCC limits the size of functions that can be inlined.  This flag
> 
> 

-- 
Richard Guenther <rguenther@suse.de>
Novell / SUSE Labs
SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746 - GF: Markus Rex


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]