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]

[gomp4, 1/23] Avoid using delete_insn late in the compilation


There's some code in get_uncond_jump_length to emit and then delete a
label and a jump.  If a target doesn't use register allocation, this
fails a "reload_completed || bb != NULL" assert in df_insn_delete.
Fixed by instead emitting the two insns into a sequence which we then
just discard.

	gcc/
	* bb-reorder.c (get_uncond_jump_length): Avoid using delete_insn,
	emit into a sequence instead.

------------------------------------------------------------------------
Index: gcc/bb-reorder.c
===================================================================
--- gcc/bb-reorder.c	(revision 422343)
+++ gcc/bb-reorder.c	(revision 422344)
@@ -1370,13 +1370,12 @@ get_uncond_jump_length (void)
   rtx label, jump;
   int length;
 
-  label = emit_label_before (gen_label_rtx (), get_insns ());
+  start_sequence ();
+  label = emit_label (gen_label_rtx ());
   jump = emit_jump_insn (gen_jump (label));
-
   length = get_attr_min_length (jump);
+  end_sequence ();
 
-  delete_insn (jump);
-  delete_insn (label);
   return length;
 }
 

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