aboutsummaryrefslogtreecommitdiff
path: root/gcc/reload1.c
diff options
context:
space:
mode:
authorBernd Schmidt <bernds@cygnus.co.uk>2000-01-12 12:40:49 +0000
committerBernd Schmidt <crux@gcc.gnu.org>2000-01-12 12:40:49 +0000
commit9e3a9cf21e21f7bc33c9cf7082e6185a4f19a919 (patch)
tree941205febbd323ea550b25d18acc1dfac3c3bd1b /gcc/reload1.c
parent02368d6dd494ec96e04bb987fcadfc39fa065301 (diff)
downloadgcc-9e3a9cf21e21f7bc33c9cf7082e6185a4f19a919.zip
gcc-9e3a9cf21e21f7bc33c9cf7082e6185a4f19a919.tar.gz
gcc-9e3a9cf21e21f7bc33c9cf7082e6185a4f19a919.tar.bz2
Fix suboptimal code generation bug in reload
From-SVN: r31352
Diffstat (limited to 'gcc/reload1.c')
-rw-r--r--gcc/reload1.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c
index d817f0f..2245e9f 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -3990,6 +3990,8 @@ forget_old_reloads_1 (x, ignored, data)
/* The following HARD_REG_SETs indicate when each hard register is
used for a reload of various parts of the current insn. */
+/* If reg is unavailable for all reloads. */
+static HARD_REG_SET reload_reg_unavailable;
/* If reg is in use as a reload reg for a RELOAD_OTHER reload. */
static HARD_REG_SET reload_reg_used;
/* If reg is in use for a RELOAD_FOR_INPUT_ADDRESS reload for operand I. */
@@ -4213,7 +4215,8 @@ reload_reg_free_p (regno, opnum, type)
int i;
/* In use for a RELOAD_OTHER means it's not available for anything. */
- if (TEST_HARD_REG_BIT (reload_reg_used, regno))
+ if (TEST_HARD_REG_BIT (reload_reg_used, regno)
+ || TEST_HARD_REG_BIT (reload_reg_unavailable, regno))
return 0;
switch (type)
@@ -4617,11 +4620,7 @@ reload_reg_free_for_value_p (regno, opnum, type, value, out, reloadnum,
int i;
int copy = 0;
- /* ??? reload_reg_used is abused to hold the registers that are not
- available as spill registers, including hard registers that are
- earlyclobbered in asms. As a temporary measure, reject anything
- in reload_reg_used. */
- if (TEST_HARD_REG_BIT (reload_reg_used, regno))
+ if (TEST_HARD_REG_BIT (reload_reg_unavailable, regno))
return 0;
if (out == const0_rtx)
@@ -5064,7 +5063,7 @@ choose_reload_regs_init (chain, save_reload_reg_rtx)
CLEAR_HARD_REG_SET (reload_reg_used_in_outaddr_addr[i]);
}
- IOR_COMPL_HARD_REG_SET (reload_reg_used, chain->used_spill_regs);
+ COMPL_HARD_REG_SET (reload_reg_unavailable, chain->used_spill_regs);
CLEAR_HARD_REG_SET (reload_reg_used_for_inherit);