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 mark uses in debug insns in dce


We don't want insns to be regarded as live just because their values
are used in dce, this would change the executable code, causing
bootstrap-debug failures (which it did).  Fixed thusly.  Installing in
the vta branch.

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

	* dce.c (mark_reg_dependencies): Skip debug insns.

Index: gcc/dce.c
===================================================================
--- gcc/dce.c.orig	2007-11-23 18:05:54.000000000 -0200
+++ gcc/dce.c	2007-12-01 22:15:05.000000000 -0200
@@ -425,6 +425,9 @@ mark_reg_dependencies (rtx insn)
   struct df_link *defs;
   struct df_ref **use_rec;
 
+  if (DEBUG_INSN_P (insn))
+    return;
+
   /* If this is part of a libcall, mark the entire libcall.  */
   if (find_reg_note (insn, REG_LIBCALL_ID, NULL_RTX))
     mark_libcall (insn, false);
-- 
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]