This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH v2] S/390: Allow LARL of literal pool entries
- From: Ilya Leoshkevich <iii at linux dot ibm dot com>
- To: Ulrich Weigand <uweigand at de dot ibm dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, krebbel at linux dot ibm dot com, rdapp at linux dot ibm dot com
- Date: Tue, 30 Oct 2018 19:40:53 +0100
- Subject: Re: [PATCH v2] S/390: Allow LARL of literal pool entries
- References: <20181030172259.4234FD802EF@oc3748833570.ibm.com>
> Am 30.10.2018 um 18:22 schrieb Ulrich Weigand <uweigand@de.ibm.com>:
>
> Ilya Leoshkevich wrote:
>
>> @@ -8223,6 +8237,18 @@ find_constant_pool_ref (rtx x, rtx *ref)
>> && XINT (x, 1) == UNSPECV_POOL_ENTRY)
>> return;
>>
>> + if (SYMBOL_REF_P (x)
>> + && CONSTANT_POOL_ADDRESS_P (x)
>> + && s390_symbol_larl_p (x))
>> + {
>> + if (*ref == NULL_RTX)
>> + *ref = x;
>> + else
>> + gcc_assert (*ref == x);
>> +
>> + return;
>> + }
>
> This definitely looks wrong. If we haven't annotated the address,
> it should *not* be found by find_constant_pool_ref, since we are
> not going to replace it! That was the whole point of not annotating
> it in the first place …
There are two use cases for find_constant_pool_ref (). One is indeed
replacing annotated references. The other (in s390_mainpool_start ()
and s390_chunkify_start ()) is creating pool entries. So I've decided
to let it find unannotated references for the second use case.
This impacts the first use case as well, that's why I have also changed
replace_constant_pool_ref () to ignore unannotated references.