This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[vta] don't look for overlapping uses in debug insns
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 03 Jan 2008 04:42:43 -0200
- Subject: [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}