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 count cprop into debug insns as changes


If we cprop during bypass *only* to debug insns, we'll end up deleting
trivially dead insns, rebuilding jump labels and cleaning up the cfg,
which, in the absence of debug insns, we wouldn't run at that point.
This leads to codegen differences detected by -fcompare-debug.

The information about changes in cprop isn't used for any other
purpose, so I arranged for debug insns to not be counted as changes,
in the patch that follows, which I'm about to install, completing
today's batch.

With this patch, i686, ppc64 and x86_64 (-linux-gnu) all bootstrap
(-O1, -O2 and -O3, all with -g -fcompare-debug) and build target
libraries (-O2 -g -fcompare-debug only).  There are still a few
testsuite regressions I'm going to look into (without
-fcompare-debug), and still a bunch of -fcompare-debug reports during
a testsuite run that has it enabled.  ia64 is still bootstrapping with
the very latest version of the patchset I've just installed.  I
decided not to wait.

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

	* gcse.c (cprop_insn): Don't count changes to debug insns as
	changes.

Index: gcc/gcse.c
===================================================================
--- gcc/gcse.c.orig	2008-10-10 09:31:05.000000000 -0300
+++ gcc/gcse.c	2008-11-20 01:25:36.000000000 -0200
@@ -3024,6 +3024,9 @@ cprop_insn (rtx insn, int alter_jumps)
 	}
     }
 
+  if (changed && DEBUG_INSN_P (insn))
+    return 0;
+
   return changed;
 }
 

-- 
Alexandre Oliva           http://www.lsd.ic.unicamp.br/~oliva/
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

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