From 19a237c7307faede6c116c6d1a06f554fb37c3c9 Mon Sep 17 00:00:00 2001 From: Josh Berdine Date: Mon, 8 Feb 2021 13:11:31 -0800 Subject: [PATCH] [sledge] Name trampoline blocks using source block instead of instr Summary: The source block name is normally visible in the LLAIR code, while the name of e.g. a branch instruction is some internal number. This change only makes the output LLAIR code slightly easier to read. Reviewed By: jvillard Differential Revision: D26250521 fbshipit-source-id: 4723a58f7 --- sledge/cli/frontend.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sledge/cli/frontend.ml b/sledge/cli/frontend.ml index 7578367be..3d46ae08a 100644 --- a/sledge/cli/frontend.ml +++ b/sledge/cli/frontend.ml @@ -903,7 +903,8 @@ let xlate_jump : let mov = Inst.move ~reg_exps:(IArray.of_list_rev rev_reg_exps) ~loc in - let lbl = find_name instr ^ ".jmp." ^ dst_lbl in + let src_lbl = label_of_block (Llvm.instr_parent instr) in + let lbl = src_lbl ^ ".jmp." ^ dst_lbl in let blk = Block.mk ~lbl ~cmnd:(IArray.of_array [|mov|])