Hi Guys,

  I would like to apply the patch below to allow simplify_subreg_regno()
  to treat the frame pointer register in the same way as the stack
  pointer register when the LRA pass is running.  I found that I needed
  this whilst trying to enable LRA for the RX and RL78 targets.  (LRA is
  still not working for these targets, but this patch lets more of
  libgcc be built than before).

  No regressions noted on an i686-pc-linux-gnu toolchain built with this
  patch applied.  OK to apply ?

Cheers
  Nick

gcc/ChangeLog
2013-05-03  Nick Clifton  <ni...@redhat.com>

        * rtlanal.c (simplify_subreg_regno): Allow simplification of
        SUBREGs involving the frame pointer when running the LRA pass.

Index: gcc/rtlanal.c
===================================================================
--- gcc/rtlanal.c       (revision 198496)
+++ gcc/rtlanal.c       (working copy)
@@ -3481,8 +3481,10 @@
     return -1;
 #endif
 
-  /* We shouldn't simplify stack-related registers.  */
+  /* We shouldn't simplify stack-related registers...  */
   if ((!reload_completed || frame_pointer_needed)
+      /* ...unless we are in LRA that is.  */
+      && ! lra_in_progress
       && xregno == FRAME_POINTER_REGNUM)
     return -1;

Reply via email to