frv.h (CLASS_LIKELY_SPILLED_P): Remove.

* config/frv/frv.h (CLASS_LIKELY_SPILLED_P): Remove.
	* config/frv/frv-protos.h (frv_class_likely_spilled_p): Remove.
	* config/frv/frv.c (frv_class_likely_spilled_p): Make static. Change
	argument type to reg_class_t. Change result type to bool.
	(TARGET_CLASS_LIKELY_SPILLED_P): Define.

From-SVN: r163924
This commit is contained in:
Anatoly Sokolov 2010-09-06 20:16:07 +04:00 committed by Anatoly Sokolov
parent 708e07fbd3
commit c28350ab29
4 changed files with 20 additions and 37 deletions

View File

@ -1,3 +1,11 @@
2010-09-06 Anatoly Sokolov <aesok@post.ru>
* config/frv/frv.h (CLASS_LIKELY_SPILLED_P): Remove.
* config/frv/frv-protos.h (frv_class_likely_spilled_p): Remove.
* config/frv/frv.c (frv_class_likely_spilled_p): Make static. Change
argument type to reg_class_t. Change result type to bool.
(TARGET_CLASS_LIKELY_SPILLED_P): Define.
2010-09-06 Nicola Pero <nicola.pero@meta-innovation.com>
PR libobjc/19850

View File

@ -1,5 +1,5 @@
/* Frv prototypes.
Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2007, 2008, 2009
Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
Contributed by Red Hat, Inc.
@ -102,7 +102,6 @@ extern int frv_trampoline_size (void);
extern enum reg_class frv_secondary_reload_class
(enum reg_class,
enum machine_mode, rtx);
extern int frv_class_likely_spilled_p (enum reg_class rclass);
extern int frv_hard_regno_mode_ok (int, enum machine_mode);
extern int frv_hard_regno_nregs (int, enum machine_mode);
extern int frv_class_max_nregs (enum reg_class rclass,

View File

@ -391,6 +391,7 @@ static reg_class_t frv_secondary_reload (bool, rtx, reg_class_t,
static bool frv_frame_pointer_required (void);
static bool frv_can_eliminate (const int, const int);
static void frv_trampoline_init (rtx, tree, rtx);
static bool frv_class_likely_spilled_p (reg_class_t);
/* Allow us to easily change the default for -malloc-cc. */
#ifndef DEFAULT_NO_ALLOC_CC
@ -481,6 +482,9 @@ static void frv_trampoline_init (rtx, tree, rtx);
#define TARGET_ASM_OUTPUT_DWARF_DTPREL frv_output_dwarf_dtprel
#endif
#undef TARGET_CLASS_LIKELY_SPILLED_P
#define TARGET_CLASS_LIKELY_SPILLED_P frv_class_likely_spilled_p
#undef TARGET_SECONDARY_RELOAD
#define TARGET_SECONDARY_RELOAD frv_secondary_reload
@ -6533,23 +6537,10 @@ frv_secondary_reload (bool in_p, rtx x, reg_class_t reload_class_i,
}
/* A C expression whose value is nonzero if pseudos that have been assigned to
registers of class RCLASS would likely be spilled because registers of RCLASS
are needed for spill registers.
/* Worker function for TARGET_CLASS_LIKELY_SPILLED_P. */
The default value of this macro returns 1 if RCLASS has exactly one register
and zero otherwise. On most machines, this default should be used. Only
define this macro to some other expression if pseudo allocated by
`local-alloc.c' end up in memory because their hard registers were needed
for spill registers. If this macro returns nonzero for those classes, those
pseudos will only be allocated by `global.c', which knows how to reallocate
the pseudo to another register. If there would not be another register
available for reallocation, you should not change the definition of this
macro since the only effect of such a definition would be to slow down
register allocation. */
int
frv_class_likely_spilled_p (enum reg_class rclass)
static bool
frv_class_likely_spilled_p (reg_class_t rclass)
{
switch (rclass)
{
@ -6574,10 +6565,10 @@ frv_class_likely_spilled_p (enum reg_class rclass)
case EVEN_ACC_REGS:
case ACC_REGS:
case ACCG_REGS:
return TRUE;
return true;
}
return FALSE;
return false;
}

View File

@ -1,5 +1,6 @@
/* Target macros for the FRV port of GCC.
Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009
Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009,
2010
Free Software Foundation, Inc.
Contributed by Red Hat Inc.
@ -1257,22 +1258,6 @@ extern enum reg_class reg_class_from_letter[];
#define SECONDARY_OUTPUT_RELOAD_CLASS(CLASS, MODE, X) \
frv_secondary_reload_class (CLASS, MODE, X)
/* A C expression whose value is nonzero if pseudos that have been assigned to
registers of class CLASS would likely be spilled because registers of CLASS
are needed for spill registers.
The default value of this macro returns 1 if CLASS has exactly one register
and zero otherwise. On most machines, this default should be used. Only
define this macro to some other expression if pseudo allocated by
`local-alloc.c' end up in memory because their hard registers were needed
for spill registers. If this macro returns nonzero for those classes, those
pseudos will only be allocated by `global.c', which knows how to reallocate
the pseudo to another register. If there would not be another register
available for reallocation, you should not change the definition of this
macro since the only effect of such a definition would be to slow down
register allocation. */
#define CLASS_LIKELY_SPILLED_P(CLASS) frv_class_likely_spilled_p (CLASS)
/* A C expression for the maximum number of consecutive registers of
class CLASS needed to hold a value of mode MODE.