From ed2b2162d0b3953789156bae4e1ece1a7991e305 Mon Sep 17 00:00:00 2001 From: Bernd Schmidt Date: Tue, 4 Nov 2014 15:25:37 +0000 Subject: [PATCH] Make a temporary sequence for a jump emitted only to examine its length. * bb-reorder.c (get_uncond_jump_length): Avoid using delete_insn, emit into a sequence instead. From-SVN: r217088 --- gcc/ChangeLog | 5 +++++ gcc/bb-reorder.c | 7 +++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d7746a92689..e5f0c4621aa 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2014-11-04 Bernd Schmidt + + * bb-reorder.c (get_uncond_jump_length): Avoid using delete_insn, + emit into a sequence instead. + 2014-11-04 Jan-Benedict Glaw * config/sh/sh.c (emit_fpu_switch): Drop unused automatic variable. diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c index 84191e4a6f5..1f7c3ee1749 100644 --- a/gcc/bb-reorder.c +++ b/gcc/bb-reorder.c @@ -1393,13 +1393,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; } -- 2.30.2