diff mbox

ptx preliminary rtl patches [2/4]

Message ID 5411A2BE.2000208@codesourcery.com
State New
Headers show

Commit Message

Bernd Schmidt Sept. 11, 2014, 1:25 p.m. UTC
There's some code in get_uncond_jump_length to emit and then delete a 
label and a jump.  On ptx we skip register allocation and reload, and 
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.

Bootstrapped and tested on x86_64-linux, together with the other 
patches.  Ok?


Bernd

Comments

Steven Bosscher Sept. 11, 2014, 3:43 p.m. UTC | #1
On Thu, Sep 11, 2014 at 3:25 PM, Bernd Schmidt wrote:
> Bootstrapped and tested on x86_64-linux, together with the other patches.
> Ok?

This is OK.

Ciao!
Steven
diff mbox

Patch

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

diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c
index b3f770d..789f1e9 100644
--- a/gcc/bb-reorder.c
+++ b/gcc/bb-reorder.c
@@ -1374,13 +1374,12 @@  get_uncond_jump_length (void)
   rtx_insn *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;
 }