Re: [PATCH] options: Fix variable tracking option processing.

2021-10-21 Thread Richard Biener via Gcc-patches
On Thu, Oct 21, 2021 at 3:14 PM Martin Liška wrote: > > On 10/21/21 11:57, Richard Biener wrote: > > which previously affected debug_nonbind_markers_p. I think it makes > > sense to move > > the above to finish_options as well. I suppose -help doesn't correctly dump > > the -g enabled state for

Re: [PATCH] options: Fix variable tracking option processing.

2021-10-21 Thread Martin Liška
nFrom da24e51c8e108373256f1106fe4478b919189c99 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Thu, 14 Oct 2021 14:57:18 +0200 Subject: [PATCH] options: Fix variable tracking option processing. PR debug/102585 PR bootstrap/102766 gcc/ChangeLog: * opts.c (finish_options): Process flag_var_tracking* options here as the

Re: [PATCH] options: Fix variable tracking option processing.

2021-10-21 Thread Richard Biener via Gcc-patches
On Wed, Oct 20, 2021 at 10:51 AM Martin Liška wrote: > > On 10/19/21 12:53, Richard Biener wrote: > > Meh ... :/ > > > > Well, move the target override hook call down (try to shuffle things > > so diagnostics happen after but > > "inits" happen before). > > Not so easy. There are direct usages of

Re: [PATCH] options: Fix variable tracking option processing.

2021-10-20 Thread Martin Liška
;s because it depends on 'optimize' and that would trigger: 'global_options are modified in local context' verification error. What do you think about the patch? Cheers, MartinFrom 1fbeeb6bb326c6e9e704be7a99b69014b1104fda Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Thu, 14 Oct 2021 14

Re: [PATCH] options: Fix variable tracking option processing.

2021-10-19 Thread Richard Biener via Gcc-patches
On Tue, Oct 19, 2021 at 11:34 AM Martin Liška wrote: > > On 10/19/21 11:12, Richard Biener wrote: > > On Fri, Oct 15, 2021 at 5:22 PM Martin Liška wrote: > >> > >> All right, and there's second part that moves the code > >> from toplev.c to opts.c (finish_options) as I've done in the original >

Re: [PATCH] options: Fix variable tracking option processing.

2021-10-19 Thread Martin Liška
On 10/19/21 11:12, Richard Biener wrote: On Fri, Oct 15, 2021 at 5:22 PM Martin Liška wrote: All right, and there's second part that moves the code from toplev.c to opts.c (finish_options) as I've done in the original version. The patch also handles PR102766 where nvptx.c target sets: debug_n

Re: [PATCH] options: Fix variable tracking option processing.

2021-10-19 Thread Richard Biener via Gcc-patches
On Fri, Oct 15, 2021 at 5:22 PM Martin Liška wrote: > > All right, and there's second part that moves the code > from toplev.c to opts.c (finish_options) as I've done in the original version. > > The patch also handles PR102766 where nvptx.c target sets: > debug_nonbind_markers_p = 0; > > So the e

Re: [PATCH] options: Fix variable tracking option processing.

2021-10-15 Thread Martin Liška
00:00 2001 From: Martin Liska Date: Thu, 14 Oct 2021 14:57:18 +0200 Subject: [PATCH] options: Fix variable tracking option processing. PR debug/102585 PR bootstrap/102766 gcc/ChangeLog: * opts.c (finish_options): Process flag_var_tracking* options here as they can be adjusted by optimize attribu

Re: [PATCH] options: Fix variable tracking option processing.

2021-10-14 Thread Richard Biener via Gcc-patches
On Thu, Oct 14, 2021 at 1:10 PM Martin Liška wrote: > > On 10/13/21 15:29, Richard Biener wrote: > > On Wed, Oct 13, 2021 at 3:12 PM Martin Liška wrote: > >> > >> On 10/13/21 14:50, Richard Biener wrote: > >>> It does, yes. But that's a ^ with flag_var_tracking_assignments_toggle;) > >>> > >>> I

Re: [PATCH] options: Fix variable tracking option processing.

2021-10-14 Thread Martin Liška
On 10/13/21 15:29, Richard Biener wrote: On Wed, Oct 13, 2021 at 3:12 PM Martin Liška wrote: On 10/13/21 14:50, Richard Biener wrote: It does, yes. But that's a ^ with flag_var_tracking_assignments_toggle;) It's also one of the more weird flags, so it could be applied after the otherwise si

Re: [PATCH] options: Fix variable tracking option processing.

2021-10-13 Thread Richard Biener via Gcc-patches
On Wed, Oct 13, 2021 at 3:12 PM Martin Liška wrote: > > On 10/13/21 14:50, Richard Biener wrote: > > It does, yes. But that's a ^ with flag_var_tracking_assignments_toggle;) > > > > It's also one of the more weird flags, so it could be applied after the > > otherwise single set of flag_var_tracki

Re: [PATCH] options: Fix variable tracking option processing.

2021-10-13 Thread Martin Liška
On 10/13/21 14:50, Richard Biener wrote: It does, yes. But that's a ^ with flag_var_tracking_assignments_toggle;) It's also one of the more weird flags, so it could be applied after the otherwise single set of flag_var_tracking_assignments ... Well, it's far from being simple. Can we please m

Re: [PATCH] options: Fix variable tracking option processing.

2021-10-13 Thread Richard Biener via Gcc-patches
On Wed, Oct 13, 2021 at 1:59 PM Martin Liška wrote: > > On 10/13/21 10:47, Richard Biener wrote: > > Let's split this;) The debug_inline_points part is OK. > > Fine. > > > > > How can debug_variable_location_views be ever -1? But the > > debug_variable_location_views part looks OK as well. > >

Re: [PATCH] options: Fix variable tracking option processing.

2021-10-13 Thread Martin Liška
On 10/13/21 10:47, Richard Biener wrote: Let's split this;) The debug_inline_points part is OK. Fine. How can debug_variable_location_views be ever -1? But the debug_variable_location_views part looks OK as well. It comes from here: gvariable-location-views=incompat5 Common Driver Rejec

Re: [PATCH] options: Fix variable tracking option processing.

2021-10-13 Thread Richard Biener via Gcc-patches
On Tue, Oct 12, 2021 at 5:21 PM Martin Liška wrote: > > On 10/11/21 15:45, Richard Biener wrote: > > Btw, I'd be more comfortable when the move of the code would be > > independent of the adjustment to not rely on AUTODETECT_VALUE. > > Can we do the latter change first (IIRC the former one failed

Re: [PATCH] options: Fix variable tracking option processing.

2021-10-12 Thread Martin Liška
On 10/11/21 15:45, Richard Biener wrote: Btw, I'd be more comfortable when the move of the code would be independent of the adjustment to not rely on AUTODETECT_VALUE. Can we do the latter change first (IIRC the former one failed already)? All right, so I'm doing the first step by eliminating A

Re: [PATCH] options: Fix variable tracking option processing.

2021-10-11 Thread Richard Biener via Gcc-patches
On Mon, Oct 11, 2021 at 3:21 PM Martin Liška wrote: > > On 10/11/21 15:05, Richard Biener wrote: > >> + if (!opts_set->x_flag_var_tracking) > >> +opts->x_flag_var_tracking = optimize >= 1; > > That's still not equivalent to the old code for -fvar-tracking-uninit which > > sets opts->x_flag_va

Re: [PATCH] options: Fix variable tracking option processing.

2021-10-11 Thread Martin Liška
On 10/11/21 15:05, Richard Biener wrote: + if (!opts_set->x_flag_var_tracking) +opts->x_flag_var_tracking = optimize >= 1; That's still not equivalent to the old code for -fvar-tracking-uninit which sets opts->x_flag_var_tracking to 1 and the old code checked that for AUTOINIT_VALUE but you

Re: [PATCH] options: Fix variable tracking option processing.

2021-10-11 Thread Richard Biener via Gcc-patches
On Mon, Oct 11, 2021 at 1:02 PM Martin Liška wrote: > > After the recent change in Optimize attribute handling, we need > finish_option function properly auto-detecting variable tracking options. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed?

[PATCH] options: Fix variable tracking option processing.

2021-10-11 Thread Martin Liška
After the recent change in Optimize attribute handling, we need finish_option function properly auto-detecting variable tracking options. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin PR debug/102585 gcc/ChangeLog: