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]

ptx preliminary rtl patches [2/4]


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
    	* 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;
 }
 

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