summaryrefslogtreecommitdiff
path: root/gcc/reload.c
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@redhat.com>2003-12-04 09:11:19 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2003-12-04 09:11:19 +0000
commit8a89dbd24275d78205f408da9acdee092850dc5a (patch)
tree54f81a2dcb6de1daefdbe36bae91815aee6946ac /gcc/reload.c
parentafb0918a9b127a64098a1267f328908acc7e4d1d (diff)
downloadgcc-8a89dbd24275d78205f408da9acdee092850dc5a.tar.gz
re PR target/13186 ([PPC] Internal compiler error in reload.c)
PR target/13186 Revert all of the following patch, except the addition of hook_bool_machine_mode_true: 2003-11-02 Richard Sandiford <rsandifo@redhat.com> * Makefile.in (targhooks.o, reload.o): Update dependencies. (GTFILES): Add targhooks.c. (gt-targhooks.h): New rule; depend on s-gtype. * target.h (direct_pool_load_p): New hook. * target-def.h (TARGET_DIRECT_POOL_LOAD_P): New macro. (TARGET_INITIALIZER): Include it. * targhooks.h (default_direct_pool_load_p): Declare. (hook_bool_machine_mode_true): Declare. * targhooks.c: Include insn-config.h, recog.h, ggc.h and gt-targhooks.h. (pool_symbol): New variable. (default_direct_pool_load_p): New function. (hook_bool_machine_mode_true): New function. * reload.c: Include target.h. (find_reloads): If an alternative will force a constant into memory, count an extra reload if constant pool symbols are not valid addresses. If an alternative uses memory to move values between registers, count the move as two reloads rather than one. * config/s390/s390.c (TARGET_DIRECT_POOL_LOAD_P): Define. * doc/tm.texi (TARGET_DIRECT_POOL_LOAD_P): Document. From-SVN: r74275
Diffstat (limited to 'gcc/reload.c')
-rw-r--r--gcc/reload.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/gcc/reload.c b/gcc/reload.c
index b448ff2d967..fe0f0474689 100644
--- a/gcc/reload.c
+++ b/gcc/reload.c
@@ -104,7 +104,6 @@ a register with any other reload. */
#include "output.h"
#include "function.h"
#include "toplev.h"
-#include "target.h"
#ifndef REGNO_MODE_OK_FOR_BASE_P
#define REGNO_MODE_OK_FOR_BASE_P(REGNO, MODE) REGNO_OK_FOR_BASE_P (REGNO)
@@ -3370,11 +3369,6 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known,
const_to_mem = 1;
if (this_alternative[i] != (int) NO_REGS)
losers++;
-
- /* If constant pool symbols are not valid addresses,
- count an extra reload for the address. */
- if (!targetm.direct_pool_load_p (operand_mode[i]))
- losers++;
}
/* If we can't reload this value at all, reject this
@@ -3400,21 +3394,6 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known,
&& ! const_to_mem)
bad = 1;
-#ifdef SECONDARY_MEMORY_NEEDED
- /* If this alternative would use memory to move a value
- between registers, it would need two reloads, one for
- the load and one for the store. Account for the extra
- reload here. */
- if (GET_CODE (operand) == REG
- && REGNO (operand) < FIRST_PSEUDO_REGISTER
- && (enum reg_class) this_alternative[i] != NO_REGS
- && (SECONDARY_MEMORY_NEEDED
- ((enum reg_class) this_alternative[i],
- REGNO_REG_CLASS (REGNO (operand)),
- GET_MODE (operand))))
- losers++;
-#endif
-
/* We prefer to reload pseudos over reloading other things,
since such reloads may be able to be eliminated later.
If we are reloading a SCRATCH, we won't be generating any