This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Unshare constants in the constant pool (PR target/42894)
- From: Jeff Law <law at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 26 Jan 2011 18:29:25 -0700
- Subject: Re: [PATCH] Unshare constants in the constant pool (PR target/42894)
- References: <20110126193731.GK2724@tyan-ft48-01.lab.bos.redhat.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 01/26/11 12:37, Jakub Jelinek wrote:
> Hi!
>
> As discussed in the PR, if a non-shareable constant is force_const_mem
> and the original expression is used elsewhere in the IL (e.g. in REG_EQUAL
> or REG_EQUIV note), unshare_all_rtl doesn't unshare it, but modification of
> the IL might result in changes of the constant in theory and if
> avoid_constant_pool_reference result is then pushed somewhere else into the
> IL, we get RTL sharing errors (as on arm on this testcase).
Well, one could easily argue that using the original expression in the
REG_EQUAL note is incorrect as well. In fact, looking over all the
calls to set_unique_reg_note shows that most either copy the value or
generate a new one.
I think that means we actually want both the varasm.c and the expr.c
change to avoid incorrect sharing.
jeff
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJNQMp1AAoJEBRtltQi2kC7LW4H/2MsJOnqPuZx+vKT5+4DCBYT
dwq6/4buU/Vbr3JOMHxNg+9FFKpC3s2gwl9N1JcsFPvBZw5XOgTuLZXR2KHoL4ub
xhF4Of1UaDIPsVZvxJnCA905ArHbIxKVELHgitWcvyIkGcJXV9u2/XXWBy27H5Ie
QvSc0ojBmEulqPnzI4r2UBlAFgKyix3OPEiZP/k8LEXAidVsezl4tB1T+kba6NtY
26Aq6mLiJ8kNQJIUjlv1I8a/pt9dMTP+Begvclro7x178caPIts+qhbucwNSHCf8
6jZbt6tm5JWUz87tzLtzC1/4rGvMuJXdpyvYUc7ul3LCe9KUNHGGxTbF359jRus=
=Vzz3
-----END PGP SIGNATURE-----