Commit 1914f5da by Richard Henderson Committed by Richard Henderson

reload.h, [...]: Revert March 15 change.

	* reload.h, reload1.c (eliminate_regs), caller-save.c, dbxout.c,
	dwarfout.c, dwarf2out.c, reload.c, sdbout.c: Revert March 15 change.
	* reload.c (push_reload): If WORD_REGISTER_OPERATIONS, reload the
	SUBREG_REG if the word count is unchanged.
	* reload1.c (eliminate_regs) [case SET]: If W_R_O, preserve
	subregs of identical word size for push_reload.

From-SVN: r17105
parent a701efba
Mon Dec 15 17:48:05 1997 Ricahrd Henderson <rth@cygnus.com>
* reload.h, reload1.c (eliminate_regs), caller-save.c, dbxout.c,
dwarfout.c, dwarf2out.c, reload.c, sdbout.c: Revert March 15 change.
* reload.c (push_reload): If WORD_REGISTER_OPERATIONS, reload the
SUBREG_REG if the word count is unchanged.
* reload1.c (eliminate_regs) [case SET]: If W_R_O, preserve
subregs of identical word size for push_reload.
Mon Dec 15 Mark Mitchell <mmitchell@usa.net> 11:41:32 1997 Mon Dec 15 Mark Mitchell <mmitchell@usa.net> 11:41:32 1997
* toplev.c (rest_of_compilation): Don't call save_for_inline_copy * toplev.c (rest_of_compilation): Don't call save_for_inline_copy
......
...@@ -19,6 +19,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, ...@@ -19,6 +19,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */ Boston, MA 02111-1307, USA. */
#include "config.h" #include "config.h"
#include <stdio.h>
#include "rtl.h" #include "rtl.h"
#include "insn-config.h" #include "insn-config.h"
#include "flags.h" #include "flags.h"
...@@ -335,7 +336,7 @@ setup_save_areas (pchanged) ...@@ -335,7 +336,7 @@ setup_save_areas (pchanged)
for (j = 1; j <= MOVE_MAX / UNITS_PER_WORD; j++) for (j = 1; j <= MOVE_MAX / UNITS_PER_WORD; j++)
if (regno_save_mem[i][j] != 0) if (regno_save_mem[i][j] != 0)
ok &= strict_memory_address_p (GET_MODE (regno_save_mem[i][j]), ok &= strict_memory_address_p (GET_MODE (regno_save_mem[i][j]),
XEXP (eliminate_regs (regno_save_mem[i][j], 0, NULL_RTX, 1), 0)); XEXP (eliminate_regs (regno_save_mem[i][j], 0, NULL_RTX), 0));
return ok; return ok;
} }
......
...@@ -1863,7 +1863,7 @@ dbxout_symbol (decl, local) ...@@ -1863,7 +1863,7 @@ dbxout_symbol (decl, local)
/* else it is something we handle like a normal variable. */ /* else it is something we handle like a normal variable. */
} }
DECL_RTL (decl) = eliminate_regs (DECL_RTL (decl), 0, NULL_RTX, 0); DECL_RTL (decl) = eliminate_regs (DECL_RTL (decl), 0, NULL_RTX);
#ifdef LEAF_REG_REMAP #ifdef LEAF_REG_REMAP
if (leaf_function) if (leaf_function)
leaf_renumber_regs_insn (DECL_RTL (decl)); leaf_renumber_regs_insn (DECL_RTL (decl));
...@@ -2184,8 +2184,8 @@ dbxout_parms (parms) ...@@ -2184,8 +2184,8 @@ dbxout_parms (parms)
/* Perform any necessary register eliminations on the parameter's rtl, /* Perform any necessary register eliminations on the parameter's rtl,
so that the debugging output will be accurate. */ so that the debugging output will be accurate. */
DECL_INCOMING_RTL (parms) DECL_INCOMING_RTL (parms)
= eliminate_regs (DECL_INCOMING_RTL (parms), 0, NULL_RTX, 0); = eliminate_regs (DECL_INCOMING_RTL (parms), 0, NULL_RTX);
DECL_RTL (parms) = eliminate_regs (DECL_RTL (parms), 0, NULL_RTX, 0); DECL_RTL (parms) = eliminate_regs (DECL_RTL (parms), 0, NULL_RTX);
#ifdef LEAF_REG_REMAP #ifdef LEAF_REG_REMAP
if (leaf_function) if (leaf_function)
{ {
......
...@@ -6968,7 +6968,7 @@ add_location_or_const_value_attribute (die, decl) ...@@ -6968,7 +6968,7 @@ add_location_or_const_value_attribute (die, decl)
if (rtl == NULL_RTX) if (rtl == NULL_RTX)
return; return;
rtl = eliminate_regs (rtl, 0, NULL_RTX, 0); rtl = eliminate_regs (rtl, 0, NULL_RTX);
#ifdef LEAF_REG_REMAP #ifdef LEAF_REG_REMAP
if (leaf_function) if (leaf_function)
leaf_renumber_regs_insn (rtl); leaf_renumber_regs_insn (rtl);
......
...@@ -1866,7 +1866,7 @@ output_bound_representation (bound, dim_num, u_or_l) ...@@ -1866,7 +1866,7 @@ output_bound_representation (bound, dim_num, u_or_l)
if (TREE_CODE (bound) == SAVE_EXPR) if (TREE_CODE (bound) == SAVE_EXPR)
output_loc_descriptor output_loc_descriptor
(eliminate_regs (SAVE_EXPR_RTL (bound), 0, NULL_RTX, 0)); (eliminate_regs (SAVE_EXPR_RTL (bound), 0, NULL_RTX));
} }
ASM_OUTPUT_LABEL (asm_out_file, end_label); ASM_OUTPUT_LABEL (asm_out_file, end_label);
...@@ -2409,7 +2409,7 @@ location_or_const_value_attribute (decl) ...@@ -2409,7 +2409,7 @@ location_or_const_value_attribute (decl)
if (rtl == NULL_RTX) if (rtl == NULL_RTX)
return; return;
rtl = eliminate_regs (rtl, 0, NULL_RTX, 0); rtl = eliminate_regs (rtl, 0, NULL_RTX);
#ifdef LEAF_REG_REMAP #ifdef LEAF_REG_REMAP
if (leaf_function) if (leaf_function)
leaf_renumber_regs_insn (rtl); leaf_renumber_regs_insn (rtl);
......
...@@ -670,7 +670,7 @@ get_secondary_mem (x, mode, opnum, type) ...@@ -670,7 +670,7 @@ get_secondary_mem (x, mode, opnum, type)
/* Get a version of the address doing any eliminations needed. If that /* Get a version of the address doing any eliminations needed. If that
didn't give us a new MEM, make a new one if it isn't valid. */ didn't give us a new MEM, make a new one if it isn't valid. */
loc = eliminate_regs (secondary_memlocs[(int) mode], VOIDmode, NULL_RTX, 0); loc = eliminate_regs (secondary_memlocs[(int) mode], VOIDmode, NULL_RTX);
mem_valid = strict_memory_address_p (mode, XEXP (loc, 0)); mem_valid = strict_memory_address_p (mode, XEXP (loc, 0));
if (! mem_valid && loc == secondary_memlocs[(int) mode]) if (! mem_valid && loc == secondary_memlocs[(int) mode])
...@@ -985,7 +985,13 @@ push_reload (in, out, inloc, outloc, class, ...@@ -985,7 +985,13 @@ push_reload (in, out, inloc, outloc, class,
&& REGNO (SUBREG_REG (out)) >= FIRST_PSEUDO_REGISTER) && REGNO (SUBREG_REG (out)) >= FIRST_PSEUDO_REGISTER)
|| GET_CODE (SUBREG_REG (out)) == MEM) || GET_CODE (SUBREG_REG (out)) == MEM)
&& ((GET_MODE_SIZE (outmode) && ((GET_MODE_SIZE (outmode)
> GET_MODE_SIZE (GET_MODE (SUBREG_REG (out)))))) > GET_MODE_SIZE (GET_MODE (SUBREG_REG (out))))
#ifdef WORD_REGISTER_OPERATIONS
|| ((GET_MODE_SIZE (outmode) - 1) / UNITS_PER_WORD ==
((GET_MODE_SIZE (GET_MODE (SUBREG_REG (out))) - 1)
/ UNITS_PER_WORD))
#endif
))
|| (GET_CODE (SUBREG_REG (out)) == REG || (GET_CODE (SUBREG_REG (out)) == REG
&& REGNO (SUBREG_REG (out)) < FIRST_PSEUDO_REGISTER && REGNO (SUBREG_REG (out)) < FIRST_PSEUDO_REGISTER
&& ((GET_MODE_SIZE (outmode) <= UNITS_PER_WORD && ((GET_MODE_SIZE (outmode) <= UNITS_PER_WORD
...@@ -2599,7 +2605,7 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p) ...@@ -2599,7 +2605,7 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p)
/* We must rerun eliminate_regs, in case the elimination /* We must rerun eliminate_regs, in case the elimination
offsets have changed. */ offsets have changed. */
rtx address = XEXP (eliminate_regs (reg_equiv_memory_loc[regno], rtx address = XEXP (eliminate_regs (reg_equiv_memory_loc[regno],
0, NULL_RTX, 0), 0, NULL_RTX),
0); 0);
if (rtx_varies_p (address)) if (rtx_varies_p (address))
...@@ -4097,7 +4103,7 @@ find_reloads_toplev (x, opnum, type, ind_levels, is_set_dest) ...@@ -4097,7 +4103,7 @@ find_reloads_toplev (x, opnum, type, ind_levels, is_set_dest)
/* We must rerun eliminate_regs, in case the elimination /* We must rerun eliminate_regs, in case the elimination
offsets have changed. */ offsets have changed. */
rtx addr = XEXP (eliminate_regs (reg_equiv_memory_loc[regno], 0, rtx addr = XEXP (eliminate_regs (reg_equiv_memory_loc[regno], 0,
NULL_RTX, 0), NULL_RTX),
0); 0);
if (rtx_varies_p (addr)) if (rtx_varies_p (addr))
...@@ -4181,7 +4187,7 @@ find_reloads_toplev (x, opnum, type, ind_levels, is_set_dest) ...@@ -4181,7 +4187,7 @@ find_reloads_toplev (x, opnum, type, ind_levels, is_set_dest)
/* We must rerun eliminate_regs, in case the elimination /* We must rerun eliminate_regs, in case the elimination
offsets have changed. */ offsets have changed. */
rtx addr = XEXP (eliminate_regs (reg_equiv_memory_loc[regno], 0, rtx addr = XEXP (eliminate_regs (reg_equiv_memory_loc[regno], 0,
NULL_RTX, 0), NULL_RTX),
0); 0);
if (BYTES_BIG_ENDIAN) if (BYTES_BIG_ENDIAN)
{ {
...@@ -4221,8 +4227,7 @@ make_memloc (ad, regno) ...@@ -4221,8 +4227,7 @@ make_memloc (ad, regno)
register int i; register int i;
/* We must rerun eliminate_regs, in case the elimination /* We must rerun eliminate_regs, in case the elimination
offsets have changed. */ offsets have changed. */
rtx tem = XEXP (eliminate_regs (reg_equiv_memory_loc[regno], 0, NULL_RTX, 0), rtx tem = XEXP (eliminate_regs (reg_equiv_memory_loc[regno], 0, NULL_RTX), 0);
0);
#if 0 /* We cannot safely reuse a memloc made here; #if 0 /* We cannot safely reuse a memloc made here;
if the pseudo appears twice, and its mem needs a reload, if the pseudo appears twice, and its mem needs a reload,
......
...@@ -145,11 +145,6 @@ extern void clear_secondary_mem PROTO((void)); ...@@ -145,11 +145,6 @@ extern void clear_secondary_mem PROTO((void));
reload TO. */ reload TO. */
extern void transfer_replacements PROTO((int, int)); extern void transfer_replacements PROTO((int, int));
/* Return 1 if ADDR is a valid memory address for mode MODE,
and check that each pseudo reg has the proper kind of
hard reg. */
extern int strict_memory_address_p PROTO((enum machine_mode, rtx));
/* Like rtx_equal_p except that it allows a REG and a SUBREG to match /* Like rtx_equal_p except that it allows a REG and a SUBREG to match
if they are the same hard reg, and has special hacks for if they are the same hard reg, and has special hacks for
autoincrement and autodecrement. */ autoincrement and autodecrement. */
...@@ -212,7 +207,7 @@ extern int regno_clobbered_p PROTO((int, rtx)); ...@@ -212,7 +207,7 @@ extern int regno_clobbered_p PROTO((int, rtx));
extern void init_reload PROTO((void)); extern void init_reload PROTO((void));
/* The reload pass itself. */ /* The reload pass itself. */
extern int reload STDIO_PROTO((rtx, int, FILE *)); extern int reload PROTO((rtx, int, FILE *));
/* Mark the slots in regs_ever_live for the hard regs /* Mark the slots in regs_ever_live for the hard regs
used by pseudo-reg number REGNO. */ used by pseudo-reg number REGNO. */
...@@ -220,7 +215,7 @@ extern void mark_home_live PROTO((int)); ...@@ -220,7 +215,7 @@ extern void mark_home_live PROTO((int));
/* Scan X and replace any eliminable registers (such as fp) with a /* Scan X and replace any eliminable registers (such as fp) with a
replacement (such as sp), plus an offset. */ replacement (such as sp), plus an offset. */
extern rtx eliminate_regs PROTO((rtx, enum machine_mode, rtx, int)); extern rtx eliminate_regs PROTO((rtx, enum machine_mode, rtx));
/* Emit code to perform a reload from IN (which may be a reload register) to /* Emit code to perform a reload from IN (which may be a reload register) to
OUT (which may also be a reload register). IN or OUT is from operand OUT (which may also be a reload register). IN or OUT is from operand
......
...@@ -789,7 +789,7 @@ sdbout_symbol (decl, local) ...@@ -789,7 +789,7 @@ sdbout_symbol (decl, local)
if (DECL_RTL (decl) == 0) if (DECL_RTL (decl) == 0)
return; return;
DECL_RTL (decl) = eliminate_regs (DECL_RTL (decl), 0, NULL_RTX, 0); DECL_RTL (decl) = eliminate_regs (DECL_RTL (decl), 0, NULL_RTX);
#ifdef LEAF_REG_REMAP #ifdef LEAF_REG_REMAP
if (leaf_function) if (leaf_function)
leaf_renumber_regs_insn (DECL_RTL (decl)); leaf_renumber_regs_insn (DECL_RTL (decl));
...@@ -1289,8 +1289,8 @@ sdbout_parms (parms) ...@@ -1289,8 +1289,8 @@ sdbout_parms (parms)
/* Perform any necessary register eliminations on the parameter's rtl, /* Perform any necessary register eliminations on the parameter's rtl,
so that the debugging output will be accurate. */ so that the debugging output will be accurate. */
DECL_INCOMING_RTL (parms) DECL_INCOMING_RTL (parms)
= eliminate_regs (DECL_INCOMING_RTL (parms), 0, NULL_RTX, 0); = eliminate_regs (DECL_INCOMING_RTL (parms), 0, NULL_RTX);
DECL_RTL (parms) = eliminate_regs (DECL_RTL (parms), 0, NULL_RTX, 0); DECL_RTL (parms) = eliminate_regs (DECL_RTL (parms), 0, NULL_RTX);
if (PARM_PASSED_IN_MEMORY (parms)) if (PARM_PASSED_IN_MEMORY (parms))
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment