This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH 3/7] Move ORIGINAL_REGNO to rtx header
- From: Jeff Law <law at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org, rdsandiford at googlemail dot com
- Date: Mon, 12 May 2014 09:46:10 -0600
- Subject: Re: [PATCH 3/7] Move ORIGINAL_REGNO to rtx header
- Authentication-results: sourceware.org; auth=none
- References: <87a9ap1k8n dot fsf at talisman dot default> <87wqdtz9a7 dot fsf at talisman dot default>
On 05/10/14 14:08, Richard Sandiford wrote:
Yea, we certainly hit REGNO much more often than ORIGINAL_REGNO, so
it'be better to move the former. However, there's still obviously
benefit in decreasing the size of a REG by a word.
...and reduce the size of REGs by one field. This is still OK for REG->MEM
conversion since MEMs only have 2 fields.
In some ways it would have been nicer to move REGNO to the header,
since we wouldn't then need to fetch the second word of the rtx when
checking whether something is a REG and then checking its REGNO.
But that's much more complicated and essentially breaks the LISPness
of rtxes; see the covering note for more details.
We currently print the ORIGINAL_REGNO twice if there are also REG_ATTRS.
I've kept this behaviour in order to ensure that the -da output wasn't
changed by the patch series, but I could turn the "if" into an "else if"
if that seems better.
Seems like a fine follow-up item.
I was briefly concerned that these objects may not fall into one of the
special buckets in the gc-allocator. But after looking at the code for
how we initialize the extra_order_size_table we're probably OK.
Tested on x86_64-linux-gnu. OK to install?
* rtl.def (REG): Remove middle field.
* rtl.h (rtx_def): Add orignal_regno to u2.
(ORIGINAL_REGNO): Use it instead of field 1.
(REG_ATTRS): Lower field index accordingly.
* gengtype.c (adjust_field_rtx_def): Remove handling of
ORIGINAL_REGNO. Move REG_ATTRS index down.
* print-rtl.c (print_rtx): Move ORIGINAL_REGNO handling to the
code that prints the REGNO.
This is fine for the trunk.