This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH 5/7] Shrink SCRATCH
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sat, 10 May 2014 21:16:58 +0100
- Subject: [PATCH 5/7] Shrink SCRATCH
- Authentication-results: sourceware.org; auth=none
- References: <87a9ap1k8n dot fsf at talisman dot default>
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.
Index: gcc/rtl.def
===================================================================
--- gcc/rtl.def 2014-05-10 21:13:03.383968475 +0100
+++ gcc/rtl.def 2014-05-10 21:13:06.240993266 +0100
@@ -384,11 +384,10 @@ DEF_RTL_EXPR(PC, "pc", "", RTX_OBJ)
DEF_RTL_EXPR(REG, "reg", "i0", RTX_OBJ)
/* A scratch register. This represents a register used only within a
- single insn. It will be turned into a REG during register allocation
+ single insn. It will be replaced by a REG during register allocation
or reload unless the constraint indicates that the register won't be
- needed, in which case it can remain a SCRATCH. This code is
- marked as having one operand so it can be turned into a REG. */
-DEF_RTL_EXPR(SCRATCH, "scratch", "0", RTX_OBJ)
+ needed, in which case it can remain a SCRATCH. */
+DEF_RTL_EXPR(SCRATCH, "scratch", "", RTX_OBJ)
/* A reference to a part of another value. The first operand is the
complete value and the second is the byte offset of the selected part. */
Index: gcc/gengtype.c
===================================================================
--- gcc/gengtype.c 2014-05-10 21:13:03.381968458 +0100
+++ gcc/gengtype.c 2014-05-10 21:13:06.242993283 +0100
@@ -1249,8 +1249,6 @@ adjust_field_rtx_def (type_p t, options_
t = tree_tp, subname = "rt_tree";
else if (i == REG && aindex == 1)
t = reg_attrs_tp, subname = "rt_reg";
- else if (i == SCRATCH && aindex == 0)
- t = scalar_tp, subname = "rt_int";
else if (i == SYMBOL_REF && aindex == 1)
t = scalar_tp, subname = "rt_int";
else if (i == SYMBOL_REF && aindex == 2)