summaryrefslogtreecommitdiff
path: root/gcc/reload1.c
diff options
context:
space:
mode:
authoredlinger <edlinger@138bc75d-0d04-0410-961f-82ee72b054a4>2016-09-09 23:08:54 +0000
committeredlinger <edlinger@138bc75d-0d04-0410-961f-82ee72b054a4>2016-09-09 23:08:54 +0000
commitacbc95ac1c85f2a0057a1d9dab3405377bb463d3 (patch)
tree4d461b9c92a59711ad23eb413d2d749005c37320 /gcc/reload1.c
parent74e229211df3e7b7a5daa22499557bff76ee0a33 (diff)
downloadgcc-acbc95ac1c85f2a0057a1d9dab3405377bb463d3.tar.gz
2016-09-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
* doc/tm.texi.in (INITIAL_FRAME_POINTER_OFFSET): Remove. (ELIMINABLE_REGS, TARGET_CAN_ELIMINATE, INITIAL_ELIMINATION_OFFSET) : Update documentation. * target.def (frame_pointer_required, can_eliminate): Likewise. * doc/tm.texi: Regenerated. * builtins.c (expand_builtin_setjmp_receiver): Remove #ifdef ELIMINABLE_REGS. * df-scan.c (df_hard_reg_init): Likewise. * ira.c (ira_setup_eliminable_regset): Likewise. * lra-eliminations.c (reg_eliminate_1, (update_reg_eliminate, init_elim_table): Likewise. * reload1.c (reg_eliminate_1, verify_initial_elim_offsets, set_initial_elim_offsets, update_eliminables, init_elim_table): Likewise. * rtlanal.c (get_initial_register_offset): Likewise. * config/ft32/ft32.h (INITIAL_FRAME_POINTER_OFFSET): Remove. * config/m32r/m32r.h (INITIAL_FRAME_POINTER_OFFSET): Likewise. * config/moxie/moxie.h (INITIAL_FRAME_POINTER_OFFSET): Likewise. * config/vax/vax.h (INITIAL_FRAME_POINTER_OFFSET): Likewise. * config/fr30/fr30.h: Fix comment. * config/frv/frv.c: Likewise. * config/frv/frv.h: Likewise. * config/ft32/ft32.h: Likewise. * config/visium/visium.h: Likewise. * config/pa/pa64-linux.h: Likewise. * config/v850/v850.h: Likewise. * config/cris/cris.c: Likewise. * config/ia64/ia64.h: Likewise. * config/moxie/moxie.h: Likewise. * config/m32r/m32r.h: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@240058 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/reload1.c')
-rw-r--r--gcc/reload1.c47
1 files changed, 7 insertions, 40 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c
index 2a9a562cbbd..da53cfa5f95 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -286,15 +286,7 @@ static const struct elim_table_1
const int to;
} reg_eliminate_1[] =
-/* If a set of eliminable registers was specified, define the table from it.
- Otherwise, default to the normal case of the frame pointer being
- replaced by the stack pointer. */
-
-#ifdef ELIMINABLE_REGS
ELIMINABLE_REGS;
-#else
- {{ FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}};
-#endif
#define NUM_ELIMINABLE_REGS ARRAY_SIZE (reg_eliminate_1)
@@ -3823,26 +3815,17 @@ static bool
verify_initial_elim_offsets (void)
{
HOST_WIDE_INT t;
+ struct elim_table *ep;
if (!num_eliminable)
return true;
-#ifdef ELIMINABLE_REGS
- {
- struct elim_table *ep;
-
- for (ep = reg_eliminate; ep < &reg_eliminate[NUM_ELIMINABLE_REGS]; ep++)
- {
- INITIAL_ELIMINATION_OFFSET (ep->from, ep->to, t);
- if (t != ep->initial_offset)
- return false;
- }
- }
-#else
- INITIAL_FRAME_POINTER_OFFSET (t);
- if (t != reg_eliminate[0].initial_offset)
- return false;
-#endif
+ for (ep = reg_eliminate; ep < &reg_eliminate[NUM_ELIMINABLE_REGS]; ep++)
+ {
+ INITIAL_ELIMINATION_OFFSET (ep->from, ep->to, t);
+ if (t != ep->initial_offset)
+ return false;
+ }
return true;
}
@@ -3854,16 +3837,11 @@ set_initial_elim_offsets (void)
{
struct elim_table *ep = reg_eliminate;
-#ifdef ELIMINABLE_REGS
for (; ep < &reg_eliminate[NUM_ELIMINABLE_REGS]; ep++)
{
INITIAL_ELIMINATION_OFFSET (ep->from, ep->to, ep->initial_offset);
ep->previous_offset = ep->offset = ep->initial_offset;
}
-#else
- INITIAL_FRAME_POINTER_OFFSET (ep->initial_offset);
- ep->previous_offset = ep->offset = ep->initial_offset;
-#endif
num_not_at_initial_offset = 0;
}
@@ -3935,9 +3913,7 @@ update_eliminables (HARD_REG_SET *pset)
for (ep = reg_eliminate; ep < &reg_eliminate[NUM_ELIMINABLE_REGS]; ep++)
if ((ep->from == HARD_FRAME_POINTER_REGNUM
&& targetm.frame_pointer_required ())
-#ifdef ELIMINABLE_REGS
|| ! targetm.can_eliminate (ep->from, ep->to)
-#endif
)
ep->can_eliminate = 0;
@@ -4058,16 +4034,13 @@ static void
init_elim_table (void)
{
struct elim_table *ep;
-#ifdef ELIMINABLE_REGS
const struct elim_table_1 *ep1;
-#endif
if (!reg_eliminate)
reg_eliminate = XCNEWVEC (struct elim_table, NUM_ELIMINABLE_REGS);
num_eliminable = 0;
-#ifdef ELIMINABLE_REGS
for (ep = reg_eliminate, ep1 = reg_eliminate_1;
ep < &reg_eliminate[NUM_ELIMINABLE_REGS]; ep++, ep1++)
{
@@ -4080,12 +4053,6 @@ init_elim_table (void)
&& (! SUPPORTS_STACK_ALIGNMENT
|| ! stack_realign_fp)));
}
-#else
- reg_eliminate[0].from = reg_eliminate_1[0].from;
- reg_eliminate[0].to = reg_eliminate_1[0].to;
- reg_eliminate[0].can_eliminate = reg_eliminate[0].can_eliminate_previous
- = ! frame_pointer_needed;
-#endif
/* Count the number of eliminable registers and build the FROM and TO
REG rtx's. Note that code in gen_rtx_REG will cause, e.g.,