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 BBs as dirty on DF rescans of debug insns


c-parse.c fails -fcompare-debug on ia64 because (IIRC) debug insns are
reset or removed, this causes the blocks containing them to be marked as
dirty, and then, shortly down the road, a df recomputation is performed
in the VTA compilation and not without, which causes codegen
differences.

This patch avoids the codegen differences by preventing changes in debug
insns from marking blocks as dirty.

Ok to install?

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

	* df-scan.c (df_ref_create): Don't mark BB as dirty on debug insns.
	(df_ref_remove): Likewise.

Index: gcc/df-scan.c
===================================================================
--- gcc/df-scan.c.orig	2009-11-08 21:22:14.000000000 -0200
+++ gcc/df-scan.c	2009-11-08 21:23:02.000000000 -0200
@@ -829,7 +829,8 @@ df_ref_create (rtx reg, rtx *loc, rtx in
   /* By adding the ref directly, df_insn_rescan my not find any
      differences even though the block will have changed.  So we need
      to mark the block dirty ourselves.  */  
-  df_set_bb_dirty (bb);
+  if (!DEBUG_INSN_P (DF_REF_INSN (ref)))
+    df_set_bb_dirty (bb);
 
   return ref;
 }
@@ -1027,7 +1028,8 @@ df_ref_remove (df_ref ref)
   /* By deleting the ref directly, df_insn_rescan my not find any
      differences even though the block will have changed.  So we need
      to mark the block dirty ourselves.  */  
-  df_set_bb_dirty (DF_REF_BB (ref));
+  if (!DEBUG_INSN_P (DF_REF_INSN (ref)))
+    df_set_bb_dirty (DF_REF_BB (ref));
   df_reg_chain_unlink (ref);
 }
 
-- 
Alexandre Oliva, freedom fighter    http://FSFLA.org/~lxoliva/
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]