diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1997-12-07 00:31:01 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1997-12-07 00:31:01 +0000 |
commit | ad87de1ece2f52d260b582709751ab9f315ab349 (patch) | |
tree | ec80f8d1e46852ac1ba45aecdcda7201c302ac6f /gcc/reload.c | |
parent | 8098b1a5d828997acb2555106b3edccc0b43b661 (diff) | |
download | gcc-ad87de1ece2f52d260b582709751ab9f315ab349.tar.gz |
Merge from gcc-2.8
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@16987 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/reload.c')
-rw-r--r-- | gcc/reload.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/gcc/reload.c b/gcc/reload.c index c8a30d3a353..f8d0b8bf159 100644 --- a/gcc/reload.c +++ b/gcc/reload.c @@ -260,7 +260,7 @@ static int this_insn_is_asm; static int hard_regs_live_known; /* Indexed by hard reg number, - element is nonegative if hard reg has been spilled. + element is nonnegative if hard reg has been spilled. This vector is passed to `find_reloads' as an argument and is not changed here. */ static short *static_reload_reg_p; @@ -4940,7 +4940,7 @@ find_reloads_address_1 (mode, x, context, loc, opnum, type, ind_levels, insn) CALL_INSN - and it does not set CC0. But don't do this if we cannot directly address the memory location, since this will make it harder to - reuse address reloads, and increses register pressure. + reuse address reloads, and increases register pressure. Also don't do this if we can probably update x directly. */ rtx equiv = reg_equiv_mem[regno]; int icode = (int) add_optab->handlers[(int) Pmode].insn_code; @@ -5351,6 +5351,18 @@ find_replacement (loc) } } + /* If *LOC is a PLUS, MINUS, or MULT, see if a replacement is scheduled for + what's inside and make a new rtl if so. */ + if (GET_CODE (*loc) == PLUS || GET_CODE (*loc) == MINUS + || GET_CODE (*loc) == MULT) + { + rtx x = find_replacement (&XEXP (*loc, 0)); + rtx y = find_replacement (&XEXP (*loc, 1)); + + if (x != XEXP (*loc, 0) || y != XEXP (*loc, 1)) + return gen_rtx (GET_CODE (*loc), GET_MODE (*loc), x, y); + } + return *loc; } |