This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Delete obsolete macros
- To: gcc-patches at gcc dot gnu dot org
- Subject: Delete obsolete macros
- From: Bernd Schmidt <bernds at pathia dot cygnus dot co dot uk>
- Date: Mon, 29 Nov 1999 17:43:55 +0000 (GMT)
OVERLAPPING_REGNO_P and INSN_CLOBBERS_REGNO_P haven't been used in years
and are too nasty to keep.
Bernd
* cse.c (FIXED_REGNO_P): Delete tests for OVERLAPPING_REGNO_P.
* global.c (global_alloc): Delete [OVERLAPPING_REGNO_P] code.
* reload.c (find_dummy_reload): Likewise.
(find_equiv_reg): Likewise; also for INSN_CLOBBERS_REGNO_P.
* reload1.c (reload_as_needed): Likewise.
* stupid.c (stupid_find_reg): Likewise.
* tm.texi (Obsolete Register Macros): Delete section.
* gmicro.h: Remove all traces of the two macros.
* i386.h: Likewise.
* m88k.h: Likewise.
* mips.h: Likewise.
Index: cse.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cse.c,v
retrieving revision 1.111
diff -u -p -r1.111 cse.c
--- cse.c 1999/11/12 11:39:08 1.111
+++ cse.c 1999/11/13 18:41:18
@@ -460,18 +460,10 @@ struct table_elt
/* Determine whether register number N is considered a fixed register for CSE.
It is desirable to replace other regs with fixed regs, to reduce need for
non-fixed hard regs.
- A reg wins if it is either the frame pointer or designated as fixed,
- but not if it is an overlapping register. */
-#ifdef OVERLAPPING_REGNO_P
+ A reg wins if it is either the frame pointer or designated as fixed. */
#define FIXED_REGNO_P(N) \
- (((N) == FRAME_POINTER_REGNUM || (N) == HARD_FRAME_POINTER_REGNUM \
- || fixed_regs[N] || global_regs[N]) \
- && ! OVERLAPPING_REGNO_P ((N)))
-#else
-#define FIXED_REGNO_P(N) \
((N) == FRAME_POINTER_REGNUM || (N) == HARD_FRAME_POINTER_REGNUM \
|| fixed_regs[N] || global_regs[N])
-#endif
/* Compute cost of X, as stored in the `cost' field of a table_elt. Fixed
hard registers and pointers into the frame are the cheapest with a cost
Index: global.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/global.c,v
retrieving revision 1.47
diff -u -p -r1.47 global.c
--- global.c 1999/11/12 01:56:17 1.47
+++ global.c 1999/11/13 18:41:20
@@ -340,11 +340,6 @@ global_alloc (file)
are safe to use only within a basic block. */
CLEAR_HARD_REG_SET (no_global_alloc_regs);
-#ifdef OVERLAPPING_REGNO_P
- for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
- if (OVERLAPPING_REGNO_P (i))
- SET_HARD_REG_BIT (no_global_alloc_regs, i);
-#endif
/* Build the regset of all eliminable registers and show we can't use those
that we already know won't be eliminated. */
Index: reload.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/reload.c,v
retrieving revision 1.90
diff -u -p -r1.90 reload.c
--- reload.c 1999/11/11 14:36:30 1.90
+++ reload.c 1999/11/13 18:41:27
@@ -1833,11 +1838,6 @@ find_dummy_reload (real_in, real_out, in
*inloc = const0_rtx;
if (regno < FIRST_PSEUDO_REGISTER
- /* A fixed reg that can overlap other regs better not be used
- for reloading in any way. */
-#ifdef OVERLAPPING_REGNO_P
- && ! (fixed_regs[regno] && OVERLAPPING_REGNO_P (regno))
-#endif
&& ! refers_to_regno_for_reload_p (regno, regno + nwords,
PATTERN (this_insn), outloc))
{
@@ -6033,15 +5972,6 @@ find_equiv_reg (goal, insn, class, other
else
return 0;
- /* On some machines, certain regs must always be rejected
- because they don't behave the way ordinary registers do. */
-
-#ifdef OVERLAPPING_REGNO_P
- if (regno >= 0 && regno < FIRST_PSEUDO_REGISTER
- && OVERLAPPING_REGNO_P (regno))
- return 0;
-#endif
-
/* Scan insns back from INSN, looking for one that copies
a value into or out of GOAL.
Stop and give up if we reach a label. */
@@ -6180,14 +6110,6 @@ find_equiv_reg (goal, insn, class, other
&& reload_reg_p[valueno] >= 0)
return 0;
- /* On some machines, certain regs must always be rejected
- because they don't behave the way ordinary registers do. */
-
-#ifdef OVERLAPPING_REGNO_P
- if (OVERLAPPING_REGNO_P (valueno))
- return 0;
-#endif
-
nregs = HARD_REGNO_NREGS (regno, mode);
valuenregs = HARD_REGNO_NREGS (valueno, mode);
@@ -6240,14 +6162,6 @@ find_equiv_reg (goal, insn, class, other
#ifdef NON_SAVING_SETJMP
if (NON_SAVING_SETJMP && GET_CODE (p) == NOTE
&& NOTE_LINE_NUMBER (p) == NOTE_INSN_SETJMP)
- return 0;
-#endif
-
-#ifdef INSN_CLOBBERS_REGNO_P
- if ((valueno >= 0 && valueno < FIRST_PSEUDO_REGISTER
- && INSN_CLOBBERS_REGNO_P (p, valueno))
- || (regno >= 0 && regno < FIRST_PSEUDO_REGISTER
- && INSN_CLOBBERS_REGNO_P (p, regno)))
return 0;
#endif
Index: reload1.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/reload1.c,v
retrieving revision 1.182
diff -u -p -r1.182 reload1.c
--- reload1.c 1999/11/09 16:52:19 1.182
+++ reload1.c 1999/11/13 18:41:39
@@ -4302,7 +3719,7 @@ reload_as_needed (live_known)
int live_known;
{
struct insn_chain *chain;
-#if defined (AUTO_INC_DEC) || defined (INSN_CLOBBERS_REGNO_P)
+#if defined (AUTO_INC_DEC)
register int i;
#endif
rtx x;
@@ -4562,16 +3979,6 @@ reload_as_needed (live_known)
if it is a call-used reg. */
else if (GET_CODE (insn) == CALL_INSN)
AND_COMPL_HARD_REG_SET(reg_reloaded_valid, call_used_reg_set);
-
- /* In case registers overlap, allow certain insns to invalidate
- particular hard registers. */
-
-#ifdef INSN_CLOBBERS_REGNO_P
- for (i = 0 ; i < FIRST_PSEUDO_REGISTER; i++)
- if (TEST_HARD_REG_BIT (reg_reloaded_valid, i)
- && INSN_CLOBBERS_REGNO_P (insn, i))
- CLEAR_HARD_REG_BIT (reg_reloaded_valid, i);
-#endif
}
/* Clean up. */
Index: stupid.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/stupid.c,v
retrieving revision 1.23
diff -u -p -r1.23 stupid.c
--- stupid.c 1999/10/27 19:27:41 1.23
+++ stupid.c 1999/11/13 18:41:40
@@ -542,15 +542,6 @@ stupid_find_reg (call_preserved, class,
int regno = i;
#endif
- /* If a register has screwy overlap problems,
- don't use it at all if not optimizing.
- Actually this is only for the 387 stack register,
- and it's because subsequent code won't work. */
-#ifdef OVERLAPPING_REGNO_P
- if (OVERLAPPING_REGNO_P (regno))
- continue;
-#endif
-
if (! TEST_HARD_REG_BIT (used, regno)
&& HARD_REGNO_MODE_OK (regno, mode))
{
Index: tm.texi
===================================================================
RCS file: /cvs/gcc/egcs/gcc/tm.texi,v
retrieving revision 1.98
diff -u -p -r1.98 tm.texi
--- tm.texi 1999/11/03 21:55:51 1.98
+++ tm.texi 1999/11/13 18:41:53
@@ -1307,7 +1307,6 @@ For returning values in registers, see @
* Values in Registers:: What kinds of values each reg can hold.
* Leaf Functions:: Renumbering registers for leaf functions.
* Stack Registers:: Handling a register stack such as 80387.
-* Obsolete Register Macros:: Macros formerly used for the 80387.
@end menu
@node Register Basics
@@ -1687,43 +1686,6 @@ of the stack.
@item LAST_STACK_REG
The number of the last stack-like register. This one is the bottom of
the stack.
-@end table
-
-@node Obsolete Register Macros
-@subsection Obsolete Macros for Controlling Register Usage
-
-These features do not work very well. They exist because they used to
-be required to generate correct code for the 80387 coprocessor of the
-80386. They are no longer used by that machine description and may be
-removed in a later version of the compiler. Don't use them!
-
-@table @code
-@findex OVERLAPPING_REGNO_P
-@item OVERLAPPING_REGNO_P (@var{regno})
-If defined, this is a C expression whose value is nonzero if hard
-register number @var{regno} is an overlapping register. This means a
-hard register which overlaps a hard register with a different number.
-(Such overlap is undesirable, but occasionally it allows a machine to
-be supported which otherwise could not be.) This macro must return
-nonzero for @emph{all} the registers which overlap each other. GCC
-can use an overlapping register only in certain limited ways. It can
-be used for allocation within a basic block, and may be spilled for
-reloading; that is all.
-
-If this macro is not defined, it means that none of the hard registers
-overlap each other. This is the usual situation.
-
-@findex INSN_CLOBBERS_REGNO_P
-@item INSN_CLOBBERS_REGNO_P (@var{insn}, @var{regno})
-If defined, this is a C expression whose value should be nonzero if
-the insn @var{insn} has the effect of mysteriously clobbering the
-contents of hard register number @var{regno}. By ``mysterious'' we
-mean that the insn's RTL expression doesn't describe such an effect.
-
-If this macro is not defined, it means that no insn clobbers registers
-mysteriously. This is the usual situation; all else being equal,
-it is best for the RTL expression to show all the activity.
-
@end table
@node Register Classes
Index: config/gmicro/gmicro.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/gmicro/gmicro.h,v
retrieving revision 1.9
diff -u -p -r1.9 gmicro.h
--- config/gmicro/gmicro.h 1999/11/01 01:47:40 1.9
+++ config/gmicro/gmicro.h 1999/11/13 18:41:55
@@ -237,11 +237,6 @@ extern int target_flags;
/* This Macro is not defined now.
#define CONDITIONAL_REGISTER_USAGE */
-/* The Gmicro has no overlapping register */
-/* #define OVERLAPPING_REGNO_P(REGNO) */
-
-/* #define INSN_CLOBBERS_REGNO_P(INSN,REGNO) */
-
/* Return number of consecutive hard regs needed starting at reg REGNO
to hold something of mode MODE.
This is ordinarily the length in words of a value of mode MODE
Index: config/i386/i386.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/i386/i386.h,v
retrieving revision 1.77
diff -u -p -r1.77 i386.h
--- config/i386/i386.h 1999/10/30 19:43:20 1.77
+++ config/i386/i386.h 1999/11/13 18:41:59
@@ -896,11 +896,6 @@ enum reg_class
#define CC_REG_P(X) (REG_P (X) && CC_REGNO_P (REGNO (X)))
#define CC_REGNO_P(X) ((X) == FLAGS_REG || (X) == FPSR_REG)
-/* 1 if register REGNO can magically overlap other regs.
- Note that nonzero values work only in very special circumstances. */
-
-/* #define OVERLAPPING_REGNO_P(REGNO) FP_REGNO_P (REGNO) */
-
/* The class value for index registers, and the one for base regs. */
#define INDEX_REG_CLASS INDEX_REGS
Index: config/m88k/m88k.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/m88k/m88k.h,v
retrieving revision 1.20
diff -u -p -r1.20 m88k.h
--- config/m88k/m88k.h 1999/10/15 06:38:01 1.20
+++ config/m88k/m88k.h 1999/11/13 18:42:04
@@ -628,10 +628,6 @@ extern int flag_pic; /* -fpic */
} \
}
-/* These interfaces that don't apply to the m88000. */
-/* OVERLAPPING_REGNO_P(REGNO) 0 */
-/* INSN_CLOBBERS_REGNO_P(INSN, REGNO) 0 */
-
/* True if register is an extended register. */
#define XRF_REGNO_P(N) ((N) < FIRST_PSEUDO_REGISTER && (N) >= FIRST_EXTENDED_REGISTER)
Index: config/mips/mips.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/mips/mips.h,v
retrieving revision 1.74
diff -u -p -r1.74 mips.h
--- config/mips/mips.h 1999/10/26 20:29:34 1.74
+++ config/mips/mips.h 1999/11/13 18:42:11
@@ -1998,20 +1998,6 @@ extern enum reg_class mips_char_to_class
#define CLASS_CANNOT_CHANGE_SIZE \
(TARGET_FLOAT64 && ! TARGET_64BIT ? FP_REGS : NO_REGS)
-
-/* If defined, this is a C expression whose value should be
- nonzero if the insn INSN has the effect of mysteriously
- clobbering the contents of hard register number REGNO. By
- "mysterious" we mean that the insn's RTL expression doesn't
- describe such an effect.
-
- If this macro is not defined, it means that no insn clobbers
- registers mysteriously. This is the usual situation; all else
- being equal, it is best for the RTL expression to show all the
- activity. */
-
-/* #define INSN_CLOBBERS_REGNO_P(INSN, REGNO) */
-
/* Stack layout; function entry, exit and calling. */