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]: Add -fipa-cp-alignment


> This patch adds -fipa-cp-alignment to provide a way to enable/disable
> alignment discovery and propagation in IPA-CP.  OK for trunk?
> 
> Thanks.
> diff --git a/gcc/common.opt b/gcc/common.opt
> index 0c60e84..e0d4a1d 100644
> --- a/gcc/common.opt
> +++ b/gcc/common.opt
> @@ -1458,6 +1458,10 @@ fipa-cp-clone
>  Common Report Var(flag_ipa_cp_clone) Optimization
>  Perform cloning to make Interprocedural constant propagation stronger
>  
> +fipa-cp-alignment
> +Common Report Var(flag_ipa_cp_alignment) Optimization
> +Perform alignment discovery and propagation to make Interprocedural constant propagation stronger
> +
>  fipa-profile
>  Common Report Var(flag_ipa_profile) Init(0) Optimization
>  Perform interprocedural profile propagation
> diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
> index 62bcece..6264034 100644
> --- a/gcc/doc/invoke.texi
> +++ b/gcc/doc/invoke.texi
> @@ -387,7 +387,7 @@ Objective-C and Objective-C++ Dialects}.
>  -fgcse-sm -fhoist-adjacent-loads -fif-conversion @gol
>  -fif-conversion2 -findirect-inlining @gol
>  -finline-functions -finline-functions-called-once -finline-limit=@var{n} @gol
> --finline-small-functions -fipa-cp -fipa-cp-clone @gol
> +-finline-small-functions -fipa-cp -fipa-cp-clone -fipa-cp-alignment @gol
>  -fipa-pta -fipa-profile -fipa-pure-const -fipa-reference -fipa-icf @gol
>  -fira-algorithm=@var{algorithm} @gol
>  -fira-region=@var{region} -fira-hoist-pressure @gol
> @@ -7323,6 +7323,7 @@ also turns on the following optimization flags:
>  -finline-small-functions @gol
>  -findirect-inlining @gol
>  -fipa-cp @gol
> +-fipa-cp-alignment @gol
>  -fipa-sra @gol
>  -fipa-icf @gol
>  -fisolate-erroneous-paths-dereference @gol
> @@ -8302,6 +8303,12 @@ it may significantly increase code size
>  (see @option{--param ipcp-unit-growth=@var{value}}).
>  This flag is enabled by default at @option{-O3}.
>  
> +@item -fipa-cp-alignment
> +@opindex -fipa-cp-alignment
> +Perform alignment discovery and propagation to make interprocedural
> +constant propagation stronger.  When enabled, interprocedural constant
> +propagation performs discovery and propagation of pointer alignment.

I think you want to mention that it is enabled by -O1+ (?) and that it needs
-fipa-cp.
Also I think the description is somewhat confusing.  The optimization propagate
alignment of function parameters to support better vectorization and string
operations, perhaps?

OK with these changes.

Honza


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