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]

[PATCH] Ignore hard register uses in DEBUG_INSNs for regs_ever_live (PR bootstrap/52397)


Hi!

Bootstrap fails on ia64-linux with Ada currently, because we get
a -fcompare-debug failure on one of the files, where a debug_insn
is the only insn that references in5 hard register (which is live on
entry of the first bb).  hard_regs_live_count array is only used to compute
regs_ever_live, so I don't see why it should take into account DEBUG_INSN
uses.  Bootstrapped/regtested on x86_64-linux and i686-linux, tested
on uint.ad* from the PR using ia64-linux cross, ok for trunk?

2012-02-28  Jakub Jelinek  <jakub@redhat.com>

	PR bootstrap/52397
	* df.h (struct df_d): Adjust comment that hard_regs_live_count
	doesn't count DEBUG_INSN refs.
	* df-scan.c (df_ref_create_structure): Don't set DF_HARD_REG_LIVE
	for DEBUG_INSN refs.

--- gcc/df.h.jj	2011-12-14 14:04:30.000000000 +0100
+++ gcc/df.h	2012-02-28 18:21:07.834599257 +0100
@@ -574,7 +574,7 @@ struct df_d
      uses and defs as well as refs in eq notes are ignored.  If the
      ref is a def, it cannot be a MAY_CLOBBER def.  If the ref is a
      use, it cannot be the emim_reg_set or be the frame or arg pointer
-     register.
+     register.  Uses in debug insns are ignored.
 
      IT IS NOT ACCEPTABLE TO MANUALLY CHANGE THIS ARRAY.  This array
      always reflects the actual number of refs in the insn stream that
--- gcc/df-scan.c.jj	2011-08-28 13:20:27.609420371 +0200
+++ gcc/df-scan.c	2012-02-28 21:43:49.341591773 +0100
@@ -2794,8 +2794,9 @@ df_ref_create_structure (enum df_ref_cla
   DF_REF_FLAGS_CLEAR (this_ref, DF_HARD_REG_LIVE);
 
   /* See if this ref needs to have DF_HARD_REG_LIVE bit set.  */
-  if ((regno < FIRST_PSEUDO_REGISTER)
-      && (!DF_REF_IS_ARTIFICIAL (this_ref)))
+  if (regno < FIRST_PSEUDO_REGISTER
+      && !DF_REF_IS_ARTIFICIAL (this_ref)
+      && !DEBUG_INSN_P (DF_REF_INSN (this_ref)))
     {
       if (DF_REF_REG_DEF_P (this_ref))
 	{

	Jakub


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