This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 5/7] Shrink SCRATCH
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 12 May 2014 17:37:18 +0100
- Subject: Re: [PATCH 5/7] Shrink SCRATCH
- Authentication-results: sourceware.org; auth=none
- References: <87a9ap1k8n dot fsf at talisman dot default> <87oaz5z8w5 dot fsf at talisman dot default> <5370F034 dot 8050602 at redhat dot com>
Jeff Law <law@redhat.com> writes:
> On 05/10/14 14:16, Richard Sandiford wrote:
>> SCRATCH has a single "0" field because reload used to turn it directly
>> into a REG. It no longer does (or could do) that since REG has three
>> fields rather than one. This patch therefore updates the comment and
>> removes the field.
>>
>> Tested on x86_64-linux-gnu. OK to install?
>>
>> Thanks,
>> Richard
>>
>>
>> gcc/
>> * rtl.def (scratch): Fix outdated comment and remove "0" field.
>> * gengtype.c (adjust_field_rtx_def): Update accordingly.
> Are you sure reload doesn't still do this? Do you have a pointer to
> when this code was removed?
The rtl.def SCRATCH entry predates the repository (1991) and I couldn't
see anything in the initial versions of reload.c or reload1.c that set
the code to a REG. local-alloc.c had:
if (qty_scratch_rtx[q])
{
if (GET_CODE (qty_scratch_rtx[q]) == REG)
abort ();
PUT_CODE (qty_scratch_rtx[q], REG);
REGNO (qty_scratch_rtx[q]) = qty_phys_reg[q];
but that was removed by:
Wed Oct 22 00:34:12 1997 Jeffrey A Law (law@cygnus.com)
* local-alloc.c (block_alloc): Don't lose if two SCRATCH expressions
are shared.
(Disappointed that you don't remember what you did in 97. :-))
I couldn't see anything in global.c that would set the code to a REG.
No current calls to PUT_CODE would do that either.
REG became bigger than SCRATCH with:
Thu Jun 25 15:08:16 1998 Mark Mitchell <mark@markmitchell.com>
* invoke.texi (-fstrict-aliasing): Document.
* rtl.texi (MEM_ALIAS_SET): Document.
Thanks,
Richard