]> git.ipfire.org Git - thirdparty/gcc.git/commit
ipa-fnsummary: Remove inconsistent bp_pack_value
authorKewen Lin <linkw@linux.ibm.com>
Wed, 22 Sep 2021 00:13:57 +0000 (19:13 -0500)
committerKewen Lin <linkw@linux.ibm.com>
Wed, 22 Sep 2021 02:07:06 +0000 (21:07 -0500)
commitcc11a171eee059b645870f2e208c530f301239c9
treee8e18037f35fbdcdc84640c5c8dfd25acfdaede0
parentae362db3e5cd4ef376a726d295f0d4a787526268
ipa-fnsummary: Remove inconsistent bp_pack_value

There is one inconsistent bit-field streaming out and in.
On the side of streaming in:

    bp_pack_value (&bp, info->inlinable, 1);
    bp_pack_value (&bp, false, 1);
    bp_pack_value (&bp, info->fp_expressions, 1);

while on the side of the streaming out:

    info->inlinable = bp_unpack_value (&bp, 1);
    info->fp_expressions = bp_unpack_value (&bp, 1)

The removal of Cilk Plus support r8-4956 missed to remove
the streaming out of the bit, instead just change the value
for streaming out to be always false.

By hacking fp_expression_p to always return true, I can see
it reads the wrong fp_expressions value (false) out in wpa.

GCC12 adopts commit 63c6446f77b9001d26f973114450d790749f282b
which removes the inconsistent streaming out instead.

gcc/ChangeLog:

* ipa-fnsummary.c (inline_read_section): Unpack a dummy bit
to keep consistent with the side of streaming out.
gcc/ipa-fnsummary.c