This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[gomp4, 1/23] Avoid using delete_insn late in the compilation
- From: Bernd Schmidt <bernds at codesourcery dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 9 Dec 2013 15:53:08 +0100
- Subject: [gomp4, 1/23] Avoid using delete_insn late in the compilation
- Authentication-results: sourceware.org; auth=none
- References: <52A5D8D4 dot 2030803 at codesourcery dot com>
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;
}