On Jun 13, 2012, Alexandre Oliva <aol...@redhat.com> wrote:

> On May  3, 2012, Alexandre Oliva <aol...@redhat.com> wrote:
>> Here are the 3 patches that, together, are equivalent to the one posted
>> before, except for the visibility of cleanup_auto_inc_dec.

> Ping?

> http://gcc.gnu.org/ml/gcc-patches/2012-05/msg00300.html

Ping²?

for  gcc/ChangeLog
from  Alexandre Oliva  <aol...@redhat.com>

        PR debug/52983
        * valtrack.h, valtrack.c: New.
        * Makefile.in (VALTRACK_H): New.
        (OBJS): Add valtrack.o.
        (valtrack.o): New.
        (cselib.o, dce.o, df-problems.o, combine.o): Add VALTRACK_H.
        * combine.c: Include valtrack.h.
        (make_compound_operation): Publish.
        (cleanup_auto_inc_dec): Move to valtrack.c.
        (struct rtx_subst_pair, propagate_for_debug_subst): Likewise.
        (propagate_for_debug): Likewise.  Add this_basic_block parameter.
        Adjust all callers.
        * cselib.c: Include valtrack.h.
        * dce.c: Likewise.
        * df-problems.c: Likewise.
        (dead_debug_init, dead_debug_reset_uses): Move to valtrack.c.
        (dead_debug_finish, dead_debug_add): Likewise.
        (dead_debug_insert_temp): Likewise.
        * df.h (struct dead_debug_use): Move to valtrack.h.
        (struct dead_debug, enum debug_temp_where): Likewise.
        (dead_debug_init, dead_debug_reset_uses): Move to valtrack.h.
        (dead_debug_finish, dead_debug_add): Likewise.
        (dead_debug_insert_temp): Likewise.
        * rtl.h (make_compound_operation): Declare.

for  gcc/ChangeLog
from  Alexandre Oliva  <aol...@redhat.com>

        PR debug/52983
        * valtrack.c (cleanup_auto_inc_dec): Implement unconditionally,
        falling back to copy_rtx on non-autoinc machines.
        (propagate_for_debug_subst): Always use cleanup_auto_inc_dec.

Ugh, the 3rd patch was a mistaken repeat of the 1st.  Here is the 3rd
patch I was supposed to have posted, that completes the fix.

for  gcc/ChangeLog
from  Alexandre Oliva  <aol...@redhat.com>

	PR debug/52983
	* valtrack.c (dead_debug_insert_temp): Use cleanup_auto_inc_dec.

Index: gcc/valtrack.c
===================================================================
--- gcc/valtrack.c.orig	2012-05-03 15:44:47.934692987 -0300
+++ gcc/valtrack.c	2012-05-03 15:44:52.540628548 -0300
@@ -385,7 +385,7 @@ dead_debug_insert_temp (struct dead_debu
 	breg = NULL;
       /* Cool, it's the same REG, we can use SRC.  */
       else if (dest == reg)
-	breg = copy_rtx (src);
+	breg = cleanup_auto_inc_dec (src, VOIDmode);
       else if (REG_P (dest))
 	{
 	  /* Hmm...  Something's fishy, we should be setting REG here.  */
@@ -394,7 +394,8 @@ dead_debug_insert_temp (struct dead_debu
 	  /* Ok, it's the same (hardware) REG, but with a different
 	     mode, so SUBREG it.  */
 	  else
-	    breg = lowpart_subreg (GET_MODE (reg), copy_rtx (src),
+	    breg = lowpart_subreg (GET_MODE (reg),
+				   cleanup_auto_inc_dec (src, VOIDmode),
 				   GET_MODE (dest));
 	}
       else if (GET_CODE (dest) == SUBREG)
@@ -415,7 +416,8 @@ dead_debug_insert_temp (struct dead_debu
 	    breg = NULL;
 	  /* Yay, we can use SRC, just adjust its mode.  */
 	  else
-	    breg = lowpart_subreg (GET_MODE (reg), copy_rtx (src),
+	    breg = lowpart_subreg (GET_MODE (reg),
+				   cleanup_auto_inc_dec (src, VOIDmode),
 				   GET_MODE (dest));
 	}
       /* Oh well, we're out of luck.  */

-- 
Alexandre Oliva, freedom fighter    http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/   FSF Latin America board member
Free Software Evangelist      Red Hat Brazil Compiler Engineer

Reply via email to