Re: [PATCH] opts: Fix up -ffold-mem-offsets option keywords

2024-01-17 Thread Richard Biener
On Thu, 18 Jan 2024, Jakub Jelinek wrote:

> Hi!
> 
> While the option was originally meant to be a Target option for a single
> target, it is an option for all targets, so should be Common rather than
> Target, and because it is an optimization option which could be different
> in between different LTO TUs, I've added Optimization keyword too.
> From what I can see, Bool is a non-documented non-existing keyword (at
> least, grep Bool *.awk shows nothing, so I've dropped that too.  Seems
> that the option parsing simply parses and ignores any non-existing keywords.
> 
> Guess we should drop the Bool keywords from the gcc/config/riscv/riscv.opt
> file eventually, so that people don't copy this around.
> 
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

OK

> 2024-01-18  Jakub Jelinek  
> 
>   PR other/113399
>   * common.opt (ffold-mem-offsets): Remove Target and Bool keywords, add
>   Common and Optimization.
> 
> --- gcc/common.opt.jj 2024-01-03 11:51:31.467732078 +0100
> +++ gcc/common.opt2024-01-17 17:22:05.975424001 +0100
> @@ -1262,7 +1262,7 @@ Common Var(flag_cprop_registers) Optimiz
>  Perform a register copy-propagation optimization pass.
>  
>  ffold-mem-offsets
> -Target Bool Var(flag_fold_mem_offsets) Init(1)
> +Common Var(flag_fold_mem_offsets) Init(1) Optimization
>  Fold instructions calculating memory offsets to the memory access 
> instruction if possible.
>  
>  fcrossjumping
> 
>   Jakub
> 
> 

-- 
Richard Biener 
SUSE Software Solutions Germany GmbH,
Frankenstrasse 146, 90461 Nuernberg, Germany;
GF: Ivo Totev, Andrew McDonald, Werner Knoblich; (HRB 36809, AG Nuernberg)


[PATCH] opts: Fix up -ffold-mem-offsets option keywords

2024-01-17 Thread Jakub Jelinek
Hi!

While the option was originally meant to be a Target option for a single
target, it is an option for all targets, so should be Common rather than
Target, and because it is an optimization option which could be different
in between different LTO TUs, I've added Optimization keyword too.
>From what I can see, Bool is a non-documented non-existing keyword (at
least, grep Bool *.awk shows nothing, so I've dropped that too.  Seems
that the option parsing simply parses and ignores any non-existing keywords.

Guess we should drop the Bool keywords from the gcc/config/riscv/riscv.opt
file eventually, so that people don't copy this around.

Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

2024-01-18  Jakub Jelinek  

PR other/113399
* common.opt (ffold-mem-offsets): Remove Target and Bool keywords, add
Common and Optimization.

--- gcc/common.opt.jj   2024-01-03 11:51:31.467732078 +0100
+++ gcc/common.opt  2024-01-17 17:22:05.975424001 +0100
@@ -1262,7 +1262,7 @@ Common Var(flag_cprop_registers) Optimiz
 Perform a register copy-propagation optimization pass.
 
 ffold-mem-offsets
-Target Bool Var(flag_fold_mem_offsets) Init(1)
+Common Var(flag_fold_mem_offsets) Init(1) Optimization
 Fold instructions calculating memory offsets to the memory access instruction 
if possible.
 
 fcrossjumping

Jakub