diff mbox series

Mark param_max_combine_insns with Optimization keyword.

Message ID 69e2b120-459b-9c7c-76a5-f90402df48a8@suse.cz
State New
Headers show
Series Mark param_max_combine_insns with Optimization keyword. | expand

Commit Message

Martin Liška Jan. 2, 2020, 11:07 a.m. UTC
Hi.

The param is changed here:

   /* Restrict the amount of work combine does at -Og while retaining
      most of its useful transforms.  */
   if (opts->x_optimize_debug)
     SET_OPTION_IF_UNSET (opts, opts_set, param_max_combine_insns, 2);

and so that it should be per-function. The only usage is in combine RTL
pass, which is per-function optimization.

Patch can bootstrap on x86_64-linux-gnu and survives regression tests.

Ready to be installed?
Thanks,
Martin

gcc/ChangeLog:

2020-01-02  Martin Liska  <mliska@suse.cz>

	PR tree-optimization/92860
	* params.opt: Mart param_max_combine_insns with Optimization
	keyword.
---
  gcc/params.opt | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Segher Boessenkool Jan. 3, 2020, 4:12 p.m. UTC | #1
Hi!

On Thu, Jan 02, 2020 at 12:07:27PM +0100, Martin Liška wrote:
> The param is changed here:
> 
>   /* Restrict the amount of work combine does at -Og while retaining
>      most of its useful transforms.  */
>   if (opts->x_optimize_debug)
>     SET_OPTION_IF_UNSET (opts, opts_set, param_max_combine_insns, 2);
> 
> and so that it should be per-function. The only usage is in combine RTL
> pass, which is per-function optimization.
> 
> Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
> 
> Ready to be installed?

Sure.  Okay for trunk.  Thanks!

> 2020-01-02  Martin Liska  <mliska@suse.cz>
> 
> 	PR tree-optimization/92860
> 	* params.opt: Mart param_max_combine_insns with Optimization
> 	keyword.

s/mart/mark/

(Btw, does this help -Og at all?  If so, shouldn't it be -O1 as well?)


Segher
Martin Liška Jan. 6, 2020, 9:09 a.m. UTC | #2
On 1/3/20 5:12 PM, Segher Boessenkool wrote:
> Hi!
> 
> On Thu, Jan 02, 2020 at 12:07:27PM +0100, Martin Liška wrote:
>> The param is changed here:
>>
>>    /* Restrict the amount of work combine does at -Og while retaining
>>       most of its useful transforms.  */
>>    if (opts->x_optimize_debug)
>>      SET_OPTION_IF_UNSET (opts, opts_set, param_max_combine_insns, 2);
>>
>> and so that it should be per-function. The only usage is in combine RTL
>> pass, which is per-function optimization.
>>
>> Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
>>
>> Ready to be installed?
> 
> Sure.  Okay for trunk.  Thanks!

Thank you.

> 
>> 2020-01-02  Martin Liska  <mliska@suse.cz>
>>
>> 	PR tree-optimization/92860
>> 	* params.opt: Mart param_max_combine_insns with Optimization
>> 	keyword.
> 
> s/mart/mark/

Will fix the typo.

> 
> (Btw, does this help -Og at all?  If so, shouldn't it be -O1 as well?)

I would say yes. The param default for -Og was added by Richi in 2014.
I'm adding him to CC.

Martin

> 
> 
> Segher
>
Jeff Law Jan. 6, 2020, 4:19 p.m. UTC | #3
On Thu, 2020-01-02 at 12:07 +0100, Martin Liška wrote:
> Hi.
> 
> The param is changed here:
> 
>    /* Restrict the amount of work combine does at -Og while retaining
>       most of its useful transforms.  */
>    if (opts->x_optimize_debug)
>      SET_OPTION_IF_UNSET (opts, opts_set, param_max_combine_insns, 2);
> 
> and so that it should be per-function. The only usage is in combine RTL
> pass, which is per-function optimization.
> 
> Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
> 
> Ready to be installed?
> Thanks,
> Martin
> 
> gcc/ChangeLog:
> 
> 2020-01-02  Martin Liska  <mliska@suse.cz>
> 
> 	PR tree-optimization/92860
> 	* params.opt: Mart param_max_combine_insns with Optimization
> 	keyword.
OK
jeff
diff mbox series

Patch

diff --git a/gcc/params.opt b/gcc/params.opt
index c58a375e4c8..6f05b29a929 100644
--- a/gcc/params.opt
+++ b/gcc/params.opt
@@ -375,7 +375,7 @@  Common Joined UInteger Var(param_max_average_unrolled_insns) Init(80) Param
 The maximum number of instructions to consider to unroll in a loop on average.
 
 -param=max-combine-insns=
-Common Joined UInteger Var(param_max_combine_insns) Init(4) IntegerRange(2, 4) Param
+Common Joined UInteger Var(param_max_combine_insns) Init(4) IntegerRange(2, 4) Param Optimization
 The maximum number of insns combine tries to combine.
 
 -param=max-completely-peel-loop-nest-depth=