This is the mail archive of the 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 3/7] Move ORIGINAL_REGNO to rtx header

On 05/10/14 14:08, Richard Sandiford wrote:
...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.
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.

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.


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