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]

var-tracking bugfix


The next Blackfin patch will add a call to split_all_insns from the
reorg pass.  split_all_insns calls verify_flow_info, and in 4.3 this
often aborts when debugging information is generated.  The var-tracking
pass can change basic block boundaries in such a way that a control flow
insn is no longer the last insn in a basic block, since a var tracking
note can replace it.

Fixed with this patch which just slightly changes the way these notes
are emitted.  Bootstrapped and regression tested on i686-linux; I've
also compiled a large number of files with -g before and after the
change, the output was identical.  Committed as 119116.


Bernd
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 119115)
+++ ChangeLog	(working copy)
@@ -1,3 +1,8 @@
+2006-11-23  Bernd Schmidt  <bernd.schmidt@analog.com>
+
+	* var-tracking.c (emit_note_insn_var_location): Take care not to
+	cause verify_flow_info failures.
+
 2006-11-22  Daniel Berlin  <dberlin@dberlin.org>
 
 	* tree-ssa-structalias.c: Remove edge weights in favor of just
Index: var-tracking.c
===================================================================
--- var-tracking.c	(revision 119115)
+++ var-tracking.c	(working copy)
@@ -2443,7 +2443,9 @@ emit_note_insn_var_location (void **varp
     complete = false;
 
   if (where == EMIT_NOTE_AFTER_INSN)
-    note = emit_note_after (NOTE_INSN_VAR_LOCATION, insn);
+    /* emit_note_after can insert a note after a flow-control insn in a basic
+       block.  That causes verify_flow_info failures.  */
+    note = emit_note_before (NOTE_INSN_VAR_LOCATION, NEXT_INSN (insn));
   else
     note = emit_note_before (NOTE_INSN_VAR_LOCATION, insn);
 

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