This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[vta] don't look for overlapping uses in debug insns


combine took a different turn on i686 bootstrap-debug when it found a
use of a pseudo in a debug insn, and it ended up not performing a
combination that, without the debug insn, it would perform.  This
mustn't happen.

propagate_for_debug (introduced in the branch a while ago) will take
care of adjusting any uses in debug insns that need adjusting because
of the combination, but it looks like it might cause silent breakage
of debug information in postreload-gcse.  I'll have to look into that
but, for now, I'm going ahead and checking this in.

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

	* rtlanal.c (reg_used_between_p): Skip debug insns.

Index: gcc/rtlanal.c
===================================================================
--- gcc/rtlanal.c.orig	2007-11-23 18:05:52.000000000 -0200
+++ gcc/rtlanal.c	2007-12-01 19:15:00.000000000 -0200
@@ -718,7 +718,7 @@ reg_used_between_p (const_rtx reg, const
     return 0;
 
   for (insn = NEXT_INSN (from_insn); insn != to_insn; insn = NEXT_INSN (insn))
-    if (INSN_P (insn)
+    if (INSN_P (insn) && !DEBUG_INSN_P (insn)
 	&& (reg_overlap_mentioned_p (reg, PATTERN (insn))
 	   || (CALL_P (insn) && find_reg_fusage (insn, USE, reg))))
       return 1;
-- 
Alexandre Oliva         http://www.lsd.ic.unicamp.br/~oliva/
FSF Latin America Board Member         http://www.fsfla.org/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]