use #if for HARD_FRAME_POINTER_IS_FRAME_POINTER less
authorTrevor Saunders <tbsaunde+gcc@tbsaunde.org>
Thu, 9 Jul 2015 02:50:14 +0000 (02:50 +0000)
committerTrevor Saunders <tbsaunde@gcc.gnu.org>
Thu, 9 Jul 2015 02:50:14 +0000 (02:50 +0000)
gcc/ChangeLog:

2015-07-08  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

* combine.c (can_combine_def_p): Don't check the value of
HARD_FRAME_POINTER_IS_FRAME_POINTER with the preprocessor.
(combinable_i3pat): Likewise.
(mark_used_regs_combine): Likewise.
* regrename.c (rename_chains): Likewise.
* reload.c (find_reloads_address): Likewise.
* sel-sched.c (mark_unavailable_hard_regs): Likewise.

From-SVN: r225594

gcc/ChangeLog
gcc/combine.c
gcc/regrename.c
gcc/reload.c
gcc/sel-sched.c

index 2275e3b6b7950232d571d50ec4a2fa99f30e04a7..62ca364299d86eb665db06d75fa48cdfba0a5ff6 100644 (file)
@@ -1,3 +1,13 @@
+2015-07-08  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
+
+       * combine.c (can_combine_def_p): Don't check the value of
+       HARD_FRAME_POINTER_IS_FRAME_POINTER with the preprocessor.
+       (combinable_i3pat): Likewise.
+       (mark_used_regs_combine): Likewise.
+       * regrename.c (rename_chains): Likewise.
+       * reload.c (find_reloads_address): Likewise.
+       * sel-sched.c (mark_unavailable_hard_regs): Likewise.
+
 2015-07-08  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
 
        * combine.c (update_rsp_from_reg_equal): Don't check if
index 14d1468699a0750f07d826c39e205dc6995323c0..2188926090ecb2ce3ab0f5533026b39fee7bc766 100644 (file)
@@ -1004,10 +1004,9 @@ can_combine_def_p (df_ref def)
   /* Do not combine frame pointer adjustments.  */
   if ((regno == FRAME_POINTER_REGNUM
        && (!reload_completed || frame_pointer_needed))
-#if !HARD_FRAME_POINTER_IS_FRAME_POINTER
-      || (regno == HARD_FRAME_POINTER_REGNUM
+      || (!HARD_FRAME_POINTER_IS_FRAME_POINTER
+         && regno == HARD_FRAME_POINTER_REGNUM
          && (!reload_completed || frame_pointer_needed))
-#endif
       || (FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
          && regno == ARG_POINTER_REGNUM && fixed_regs[regno]))
     return false;
@@ -2221,9 +2220,8 @@ combinable_i3pat (rtx_insn *i3, rtx *loc, rtx i2dest, rtx i1dest, rtx i0dest,
          && REG_P (subdest)
          && reg_referenced_p (subdest, PATTERN (i3))
          && REGNO (subdest) != FRAME_POINTER_REGNUM
-#if !HARD_FRAME_POINTER_IS_FRAME_POINTER
-         && REGNO (subdest) != HARD_FRAME_POINTER_REGNUM
-#endif
+         && (HARD_FRAME_POINTER_IS_FRAME_POINTER
+             || REGNO (subdest) != HARD_FRAME_POINTER_REGNUM)
          && (FRAME_POINTER_REGNUM == ARG_POINTER_REGNUM
              || (REGNO (subdest) != ARG_POINTER_REGNUM
                  || ! fixed_regs [REGNO (subdest)]))
@@ -13322,9 +13320,8 @@ mark_used_regs_combine (rtx x)
        {
          /* None of this applies to the stack, frame or arg pointers.  */
          if (regno == STACK_POINTER_REGNUM
-#if !HARD_FRAME_POINTER_IS_FRAME_POINTER
-             || regno == HARD_FRAME_POINTER_REGNUM
-#endif
+             || (!HARD_FRAME_POINTER_IS_FRAME_POINTER
+                 && regno == HARD_FRAME_POINTER_REGNUM)
              || (FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
                  && regno == ARG_POINTER_REGNUM && fixed_regs[regno])
              || regno == FRAME_POINTER_REGNUM)
index 174d3b57368d6ea80deeabd48ab99ed8377ff185..e5248a54f62864e64f98ed02f63787a5356d77a7 100644 (file)
@@ -442,12 +442,10 @@ rename_chains (void)
        continue;
 
       if (fixed_regs[reg] || global_regs[reg]
-#if !HARD_FRAME_POINTER_IS_FRAME_POINTER
-         || (frame_pointer_needed && reg == HARD_FRAME_POINTER_REGNUM)
-#else
-         || (frame_pointer_needed && reg == FRAME_POINTER_REGNUM)
-#endif
-         )
+         || (!HARD_FRAME_POINTER_IS_FRAME_POINTER && frame_pointer_needed
+             && reg == HARD_FRAME_POINTER_REGNUM)
+         || (HARD_FRAME_POINTER_REGNUM && frame_pointer_needed
+             && reg == FRAME_POINTER_REGNUM))
        continue;
 
       COPY_HARD_REG_SET (this_unavailable, unavailable);
index bf57707f60da7955a2fd6a4984b817e080bdcf32..771f9b46bf3d758ac5186e7eb21006c16de95d3e 100644 (file)
@@ -5169,9 +5169,8 @@ find_reloads_address (machine_mode mode, rtx *memrefloc, rtx ad,
       if ((regno_ok_for_base_p (REGNO (operand), mode, as, inner_code,
                                GET_CODE (addend))
           || operand == frame_pointer_rtx
-#if !HARD_FRAME_POINTER_IS_FRAME_POINTER
-          || operand == hard_frame_pointer_rtx
-#endif
+          || (!HARD_FRAME_POINTER_IS_FRAME_POINTER
+              && operand == hard_frame_pointer_rtx)
           || (FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
               && operand == arg_pointer_rtx)
           || operand == stack_pointer_rtx)
index 40dd503dae134bf39c84a8a035a93f2143bcc11b..ec2ab05c3b320a702dc68eef94267045ab53b9f6 100644 (file)
@@ -1191,11 +1191,10 @@ mark_unavailable_hard_regs (def_t def, struct reg_rename *reg_rename_p,
      frame pointer, or we could not discover its class.  */
   if (fixed_regs[regno]
       || global_regs[regno]
-#if !HARD_FRAME_POINTER_IS_FRAME_POINTER
-      || (frame_pointer_needed && regno == HARD_FRAME_POINTER_REGNUM)
-#else
-      || (frame_pointer_needed && regno == FRAME_POINTER_REGNUM)
-#endif
+      || (!HARD_FRAME_POINTER_IS_FRAME_POINTER && frame_pointer_needed
+         && regno == HARD_FRAME_POINTER_REGNUM)
+      || (HARD_FRAME_POINTER_REGNUM && frame_pointer_needed
+         && regno == FRAME_POINTER_REGNUM)
       || (reload_completed && cl == NO_REGS))
     {
       SET_HARD_REG_SET (reg_rename_p->unavailable_hard_regs);