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
This commit is contained in:
Bernd Schmidt 2014-11-04 15:25:37 +00:00 committed by Bernd Schmidt
parent 5cfd56a7db
commit ed2b2162d0
2 changed files with 8 additions and 4 deletions

View file

@ -1,3 +1,8 @@
2014-11-04 Bernd Schmidt <bernds@codesourcery.com>
* bb-reorder.c (get_uncond_jump_length): Avoid using delete_insn,
emit into a sequence instead.
2014-11-04 Jan-Benedict Glaw <jbglaw@lug-owl.de>
* config/sh/sh.c (emit_fpu_switch): Drop unused automatic variable.

View file

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