aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/combine.c18
-rw-r--r--gcc/df-problems.c5
-rw-r--r--gcc/df-scan.c20
-rw-r--r--gcc/emit-rtl.c5
-rw-r--r--gcc/reginfo.c5
-rw-r--r--gcc/reload.c5
-rw-r--r--gcc/rtlanal.c5
8 files changed, 32 insertions, 37 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 74ac8f4..f096999 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,11 @@
2015-05-20 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
+ * combine.c, df-problems.c, df-scan.c, emit-rtl.c, reginfo.c,
+ reload.c, rtlanal.c: Remove comparison of ARG_FRAME_POINTER_REGNUM
+ and FRAME_POINTER_REGNUM with the preprocessor.
+
+2015-05-20 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
+
* defaults.h: Add default for STACK_PUSH_CODE.
* expr.c: Don't redefine STACK_PUSH_CODE.
* recog.c: Likewise.
diff --git a/gcc/combine.c b/gcc/combine.c
index 8c527a7..ff7bced 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -1028,10 +1028,8 @@ can_combine_def_p (df_ref def)
|| (regno == HARD_FRAME_POINTER_REGNUM
&& (!reload_completed || frame_pointer_needed))
#endif
-#if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
- || (regno == ARG_POINTER_REGNUM && fixed_regs[regno])
-#endif
- )
+ || (FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
+ && regno == ARG_POINTER_REGNUM && fixed_regs[regno]))
return false;
return true;
@@ -2247,10 +2245,9 @@ combinable_i3pat (rtx_insn *i3, rtx *loc, rtx i2dest, rtx i1dest, rtx i0dest,
#if !HARD_FRAME_POINTER_IS_FRAME_POINTER
&& REGNO (subdest) != HARD_FRAME_POINTER_REGNUM
#endif
-#if ARG_POINTER_REGNUM != FRAME_POINTER_REGNUM
- && (REGNO (subdest) != ARG_POINTER_REGNUM
- || ! fixed_regs [REGNO (subdest)])
-#endif
+ && (FRAME_POINTER_REGNUM == ARG_POINTER_REGNUM
+ || (REGNO (subdest) != ARG_POINTER_REGNUM
+ || ! fixed_regs [REGNO (subdest)]))
&& REGNO (subdest) != STACK_POINTER_REGNUM)
{
if (*pi3dest_killed)
@@ -13340,9 +13337,8 @@ mark_used_regs_combine (rtx x)
#if !HARD_FRAME_POINTER_IS_FRAME_POINTER
|| regno == HARD_FRAME_POINTER_REGNUM
#endif
-#if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
- || (regno == ARG_POINTER_REGNUM && fixed_regs[regno])
-#endif
+ || (FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
+ && regno == ARG_POINTER_REGNUM && fixed_regs[regno])
|| regno == FRAME_POINTER_REGNUM)
return;
diff --git a/gcc/df-problems.c b/gcc/df-problems.c
index 25cfe08..ff08abd 100644
--- a/gcc/df-problems.c
+++ b/gcc/df-problems.c
@@ -933,12 +933,11 @@ df_lr_local_compute (bitmap all_blocks ATTRIBUTE_UNUSED)
reference of the frame pointer. */
bitmap_set_bit (&df->hardware_regs_used, FRAME_POINTER_REGNUM);
-#if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
/* Pseudos with argument area equivalences may require
reloading via the argument pointer. */
- if (fixed_regs[ARG_POINTER_REGNUM])
+ if (FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
+ && fixed_regs[ARG_POINTER_REGNUM])
bitmap_set_bit (&df->hardware_regs_used, ARG_POINTER_REGNUM);
-#endif
/* Any constant, or pseudo with constant equivalences, may
require reloading from memory using the pic register. */
diff --git a/gcc/df-scan.c b/gcc/df-scan.c
index c831730..e32eaf5 100644
--- a/gcc/df-scan.c
+++ b/gcc/df-scan.c
@@ -3446,12 +3446,11 @@ df_get_regular_block_artificial_uses (bitmap regular_block_artificial_uses)
bitmap_set_bit (regular_block_artificial_uses,
HARD_FRAME_POINTER_REGNUM);
-#if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
/* Pseudos with argument area equivalences may require
reloading via the argument pointer. */
- if (fixed_regs[ARG_POINTER_REGNUM])
+ if (FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
+ && fixed_regs[ARG_POINTER_REGNUM])
bitmap_set_bit (regular_block_artificial_uses, ARG_POINTER_REGNUM);
-#endif
/* Any constant, or pseudo with constant equivalences, may
require reloading from memory using the pic register. */
@@ -3498,10 +3497,9 @@ df_get_eh_block_artificial_uses (bitmap eh_block_artificial_uses)
bitmap_set_bit (eh_block_artificial_uses,
HARD_FRAME_POINTER_REGNUM);
}
-#if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
- if (fixed_regs[ARG_POINTER_REGNUM])
+ if (FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
+ && fixed_regs[ARG_POINTER_REGNUM])
bitmap_set_bit (eh_block_artificial_uses, ARG_POINTER_REGNUM);
-#endif
}
}
@@ -3579,12 +3577,11 @@ df_get_entry_block_def_set (bitmap entry_block_defs)
/* These registers are live everywhere. */
if (!reload_completed)
{
-#if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
/* Pseudos with argument area equivalences may require
reloading via the argument pointer. */
- if (fixed_regs[ARG_POINTER_REGNUM])
+ if (FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
+ && fixed_regs[ARG_POINTER_REGNUM])
bitmap_set_bit (entry_block_defs, ARG_POINTER_REGNUM);
-#endif
/* Any constant, or pseudo with constant equivalences, may
require reloading from memory using the pic register. */
@@ -3781,16 +3778,15 @@ df_exit_block_uses_collect (struct df_collection_rec *collection_rec, bitmap exi
df_ref_record (DF_REF_ARTIFICIAL, collection_rec, regno_reg_rtx[i], NULL,
EXIT_BLOCK_PTR_FOR_FN (cfun), NULL, DF_REF_REG_USE, 0);
-#if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
/* It is deliberate that this is not put in the exit block uses but
I do not know why. */
- if (reload_completed
+ if (FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
+ && reload_completed
&& !bitmap_bit_p (exit_block_uses, ARG_POINTER_REGNUM)
&& bb_has_eh_pred (EXIT_BLOCK_PTR_FOR_FN (cfun))
&& fixed_regs[ARG_POINTER_REGNUM])
df_ref_record (DF_REF_ARTIFICIAL, collection_rec, regno_reg_rtx[ARG_POINTER_REGNUM], NULL,
EXIT_BLOCK_PTR_FOR_FN (cfun), NULL, DF_REF_REG_USE, 0);
-#endif
df_canonize_collection_rec (collection_rec);
}
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index 8270ce9..360f37d 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -739,8 +739,9 @@ gen_rtx_REG (machine_mode mode, unsigned int regno)
&& regno == HARD_FRAME_POINTER_REGNUM
&& (!reload_completed || frame_pointer_needed))
return hard_frame_pointer_rtx;
-#if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM && !HARD_FRAME_POINTER_IS_ARG_POINTER
- if (regno == ARG_POINTER_REGNUM)
+#if !HARD_FRAME_POINTER_IS_ARG_POINTER
+ if (FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
+ && regno == ARG_POINTER_REGNUM)
return arg_pointer_rtx;
#endif
#ifdef RETURN_ADDRESS_POINTER_REGNUM
diff --git a/gcc/reginfo.c b/gcc/reginfo.c
index bc2f8de..e26520b 100644
--- a/gcc/reginfo.c
+++ b/gcc/reginfo.c
@@ -464,10 +464,9 @@ init_reg_sets_1 (void)
else if (!HARD_FRAME_POINTER_IS_FRAME_POINTER
&& i == HARD_FRAME_POINTER_REGNUM)
;
-#if ARG_POINTER_REGNUM != FRAME_POINTER_REGNUM
- else if (i == ARG_POINTER_REGNUM && fixed_regs[i])
+ else if (FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
+ && i == ARG_POINTER_REGNUM && fixed_regs[i])
;
-#endif
else if (!PIC_OFFSET_TABLE_REG_CALL_CLOBBERED
&& i == (unsigned) PIC_OFFSET_TABLE_REGNUM && fixed_regs[i])
;
diff --git a/gcc/reload.c b/gcc/reload.c
index f2482fc..fe2ffe6 100644
--- a/gcc/reload.c
+++ b/gcc/reload.c
@@ -5184,9 +5184,8 @@ find_reloads_address (machine_mode mode, rtx *memrefloc, rtx ad,
#if !HARD_FRAME_POINTER_IS_FRAME_POINTER
|| operand == hard_frame_pointer_rtx
#endif
-#if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
- || operand == arg_pointer_rtx
-#endif
+ || (FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
+ && operand == arg_pointer_rtx)
|| operand == stack_pointer_rtx)
&& ! maybe_memory_address_addr_space_p
(mode, ad, as, &XEXP (XEXP (ad, 0), 1 - op_index)))
diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c
index 377b31f..fce93ab 100644
--- a/gcc/rtlanal.c
+++ b/gcc/rtlanal.c
@@ -1445,9 +1445,8 @@ refers_to_regno_p (unsigned int regno, unsigned int endregno, const_rtx x,
clobber a virtual register. In fact, we could be more precise,
but it isn't worth it. */
if ((x_regno == STACK_POINTER_REGNUM
-#if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
- || x_regno == ARG_POINTER_REGNUM
-#endif
+ || (FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
+ && x_regno == ARG_POINTER_REGNUM)
|| x_regno == FRAME_POINTER_REGNUM)
&& regno >= FIRST_VIRTUAL_REGISTER && regno <= LAST_VIRTUAL_REGISTER)
return true;