summaryrefslogtreecommitdiff
path: root/gcc/bb-reorder.c
diff options
context:
space:
mode:
authorbernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>2014-11-04 15:25:37 +0000
committerbernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>2014-11-04 15:25:37 +0000
commit56cc24290e60f18c1e13653850b900d1e805717e (patch)
tree7e6e6ef6cb5c40957fcd87ae5f086cd4549ee777 /gcc/bb-reorder.c
parentfb28256fb0e4587a30d1634ae013a35cd395f2ce (diff)
downloadgcc-56cc24290e60f18c1e13653850b900d1e805717e.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217088 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/bb-reorder.c')
-rw-r--r--gcc/bb-reorder.c7
1 files changed, 3 insertions, 4 deletions
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;
}