From: Richard Biener <richard.guenther@gmail.com>
To: "Martin Liška" <mliska@suse.cz>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] options: Fix variable tracking option processing.
Date: Mon, 11 Oct 2021 15:45:19 +0200 [thread overview]
Message-ID: <CAFiYyc1+RQR86sP6OX6h63=od_m_07rcWjHJ=fe0p7=KDJDBhw@mail.gmail.com> (raw)
In-Reply-To: <202e07b3-e8d5-85e2-c0a5-8a40a61d7175@suse.cz>
On Mon, Oct 11, 2021 at 3:21 PM Martin Liška <mliska@suse.cz> 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_var_tracking to 1 and the old code checked that
> > for AUTOINIT_VALUE but you override it here for -O0.
> >
>
> Do you mean the newly added code:
>
> + if (!opts_set->x_flag_var_tracking)
>
> + opts->x_flag_var_tracking = optimize >= 1;
>
>
> that should be equivalent to:
>
> - if (flag_var_tracking == AUTODETECT_VALUE)
>
> - flag_var_tracking = optimize >= 1;
>
>
> ? Or do I miss something?
Yes. I think to be equivalent it would need to be
if (!opts_set->x_flag_var_tracking_uninit
&& !opts_set->x_flag_var_tracking)
opts->x_flag_var_tracking = optimize >= 1;
see how in the old code the order of the tests makes a difference
because we test flag_* we also set. Please double-check the change
with regard to that.
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)?
Richard.
>
> Thanks,
> Martin
next prev parent reply other threads:[~2021-10-11 13:45 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-11 11:01 Martin Liška
2021-10-11 13:05 ` Richard Biener
2021-10-11 13:21 ` Martin Liška
2021-10-11 13:45 ` Richard Biener [this message]
2021-10-12 15:21 ` Martin Liška
2021-10-13 8:47 ` Richard Biener
2021-10-13 11:59 ` Martin Liška
2021-10-13 12:50 ` Richard Biener
2021-10-13 13:12 ` Martin Liška
2021-10-13 13:29 ` Richard Biener
2021-10-14 11:10 ` Martin Liška
2021-10-14 12:07 ` Richard Biener
2021-10-15 15:22 ` Martin Liška
2021-10-19 9:12 ` Richard Biener
2021-10-19 9:34 ` Martin Liška
2021-10-19 10:53 ` Richard Biener
2021-10-20 8:51 ` Martin Liška
2021-10-21 9:57 ` Richard Biener
2021-10-21 13:14 ` Martin Liška
2021-10-21 13:17 ` Richard Biener
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAFiYyc1+RQR86sP6OX6h63=od_m_07rcWjHJ=fe0p7=KDJDBhw@mail.gmail.com' \
--to=richard.guenther@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=mliska@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).