This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2] S/390: Allow LARL of literal pool entries


> 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]