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: Remove bad comment in scan_paradoxical_subregs in reload1.c


Jim Wilson <wilson@specifixinc.com> writes:

> Ian Lance Taylor wrote:
> > I'm pretty sure that this documented restriction no longer exists.
> > I'm pretty sure that the current compiler will use such a register for
> > reload when it can.  But I don't know how to prove it, so I'm not
> > going to propose modifying the documentation.
> 
> I don't think it is hard to prove this.  I wrote an x86 testcase that
> uses 6 register variables, compiled it with -O2, and 2 of them got
> used for spill registers in reload.  I think that clearly proves that
> the restriction no longer exists.

Oh.  Duh.  I was just looking at the source code.

> Please also delete the one sentence in extend.texi that claims these
> registers are not used by reload.

This is what I checked in.

Ian


2004-02-19  Ian Lance Taylor  <ian@wasabisystems.com>

	* reload1.c (reload): Correct comment.
	(scan_paradoxical_subregs): Remove #if 0 and old comment.


Index: reload1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/reload1.c,v
retrieving revision 1.427
diff -p -u -r1.427 reload1.c
--- reload1.c	6 Feb 2004 22:10:22 -0000	1.427
+++ reload1.c	19 Feb 2004 15:17:27 -0000
@@ -707,10 +707,9 @@ reload (rtx first, int global)
 
   CLEAR_HARD_REG_SET (bad_spill_regs_global);
 
-  /* Look for REG_EQUIV notes; record what each pseudo is equivalent to.
-     Also find all paradoxical subregs and find largest such for each pseudo.
-     On machines with small register classes, record hard registers that
-     are used for user variables.  These can never be used for spills.  */
+  /* Look for REG_EQUIV notes; record what each pseudo is equivalent
+     to.  Also find all paradoxical subregs and find largest such for
+     each pseudo.  */
 
   num_eliminable_invariants = 0;
   for (insn = first; insn; insn = NEXT_INSN (insn))
@@ -3713,9 +3712,7 @@ finish_spills (int global)
   return something_changed;
 }
 
-/* Find all paradoxical subregs within X and update reg_max_ref_width.
-   Also mark any hard registers used to store user variables as
-   forbidden from being used for spill registers.  */
+/* Find all paradoxical subregs within X and update reg_max_ref_width.  */
 
 static void
 scan_paradoxical_subregs (rtx x)
@@ -3727,13 +3724,6 @@ scan_paradoxical_subregs (rtx x)
   switch (code)
     {
     case REG:
-#if 0
-      if (SMALL_REGISTER_CLASSES && REGNO (x) < FIRST_PSEUDO_REGISTER
-	  && REG_USERVAR_P (x))
-	SET_HARD_REG_BIT (bad_spill_regs_global, REGNO (x));
-#endif
-      return;
-
     case CONST_INT:
     case CONST:
     case SYMBOL_REF:
Index: doc/extend.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/extend.texi,v
retrieving revision 1.184
diff -p -u -r1.184 extend.texi
--- doc/extend.texi	4 Feb 2004 05:13:40 -0000	1.184
+++ doc/extend.texi	19 Feb 2004 15:17:30 -0000
@@ -4417,10 +4417,7 @@ example, some 68000 operating systems ca
 
 Defining such a register variable does not reserve the register; it
 remains available for other uses in places where flow control determines
-the variable's value is not live.  However, these registers are made
-unavailable for use in the reload pass; excessive use of this feature
-leaves the compiler too few available registers to compile certain
-functions.
+the variable's value is not live.
 
 This option does not guarantee that GCC will generate code that has
 this variable in the register you specify at all times.  You may not


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