From: Richard Biener <richard.guenther@gmail.com>
To: "Kewen.Lin" <linkw@linux.ibm.com>
Cc: "GCC Patches" <gcc-patches@gcc.gnu.org>,
"Jan Hubicka" <hubicka@ucw.cz>, "Martin Liška" <mliska@suse.cz>,
"Martin Jambor" <mjambor@suse.cz>,
"Segher Boessenkool" <segher@kernel.crashing.org>,
"Bill Schmidt" <wschmidt@linux.ibm.com>
Subject: Re: [PATCH] ipa-fnsummary: Remove inconsistent bp_pack_value
Date: Fri, 17 Sep 2021 12:04:07 +0200 [thread overview]
Message-ID: <CAFiYyc1yQ_THUdKQmfrEz4OjxoZuzkdsscQvWww41qKDN4Y_pg@mail.gmail.com> (raw)
In-Reply-To: <CAFiYyc3gbv_+8ZHiDFBimMSF3UZZJWfGVgJP6HqaY-O2zywG_A@mail.gmail.com>
On Fri, Sep 17, 2021 at 12:03 PM Richard Biener
<richard.guenther@gmail.com> wrote:
>
> On Fri, Sep 17, 2021 at 11:43 AM Kewen.Lin <linkw@linux.ibm.com> wrote:
> >
> > Hi,
> >
> > When changing target_info with bitfield, I happened to find this
> > inconsistent streaming in and out. We have the streaming in:
> >
> > bp_pack_value (&bp, info->inlinable, 1);
> > bp_pack_value (&bp, false, 1);
> > bp_pack_value (&bp, info->fp_expressions, 1);
> >
> > while the streaming out:
> >
> > info->inlinable = bp_unpack_value (&bp, 1);
> > info->fp_expressions = bp_unpack_value (&bp, 1)
> >
> > The cleanup of Cilk Plus support seemed to miss to remove the bit
> > streaming out but change with streaming false.
> >
> > By hacking fp_expression_p to return true always, I can see it
> > reads the wrong fp_expressions value (false) out in wpa dumping.
> >
> > Bootstrapped and regress-tested on powerpc64le-linux-gnu Power9.
> >
> > Is it ok for trunk?
>
> OK for trunk and all affected branches (note we need to bump the
> LTO minor version there). The issue comes from the removal
> of cilk+ in r8-4956 which removed the bp_unpack but replaced
> the bp_pack ...
>
> It's a correctness issue as we'll read fp_expressions as always 'false'
Btw, on branches we could also simply unpack a dummy bit to avoid
changing the format.
> Thanks,
> Richard.
>
> >
> > BR,
> > Kewen
> > -----
> > gcc/ChangeLog:
> >
> > * ipa-fnsummary.c (ipa_fn_summary_write): Remove inconsistent
> > bitfield streaming out.
> >
> > diff --git a/gcc/ipa-fnsummary.c b/gcc/ipa-fnsummary.c
> > index 2470937460f..31199919405 100644
> > --- a/gcc/ipa-fnsummary.c
> > +++ b/gcc/ipa-fnsummary.c
> > @@ -4652,7 +4652,6 @@ ipa_fn_summary_write (void)
> > info->time.stream_out (ob);
> > bp = bitpack_create (ob->main_stream);
> > bp_pack_value (&bp, info->inlinable, 1);
> > - bp_pack_value (&bp, false, 1);
> > bp_pack_value (&bp, info->fp_expressions, 1);
> > streamer_write_bitpack (&bp);
> > streamer_write_uhwi (ob, vec_safe_length (info->conds));
next prev parent reply other threads:[~2021-09-17 10:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-17 9:42 Kewen.Lin
2021-09-17 10:03 ` Richard Biener
2021-09-17 10:04 ` Richard Biener [this message]
2021-09-21 2:08 ` Kewen.Lin
2021-09-21 6:16 ` Richard Biener
2021-09-22 5:09 ` Kewen.Lin
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=CAFiYyc1yQ_THUdKQmfrEz4OjxoZuzkdsscQvWww41qKDN4Y_pg@mail.gmail.com \
--to=richard.guenther@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=hubicka@ucw.cz \
--cc=linkw@linux.ibm.com \
--cc=mjambor@suse.cz \
--cc=mliska@suse.cz \
--cc=segher@kernel.crashing.org \
--cc=wschmidt@linux.ibm.com \
/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).