[PATCH]: Add -fipa-cp-alignment

H.J. Lu hjl.tools@gmail.com
Tue Feb 17 20:33:00 GMT 2015


On Tue, Feb 17, 2015 at 12:13 PM, Jan Hubicka <hubicka@ucw.cz> wrote:
>> 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.
>

This is the updated patch I am going to check in shortly.

Thanks.


-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ipa-cp-alignment.patch
Type: text/x-patch
Size: 5457 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20150217/c3219872/attachment.bin>


More information about the Gcc-patches mailing list