(jump_insn # 0 0 8 (parallel [
(set (pc)
(reg:DI 0 ax [93]))
(use (label_ref #))
]) "swtest.c":14:3# {*tablejump_1}
(nil)
-> 8)
(barrier # 0 0)
(code_label # 0 0 8 (nil) [2 uses])
(jump_table_data # 0 0 (addr_vec:DI [
(label_ref:DI #)
(label_ref:DI #)
...
]))
As you can see jump_insn uses opcode tablejump_1 refering to label 8. Right after this label located RTL with code jump_table_data - perhaps this is bad idea to assume that it always will be true so it`s better to use function jump_table_for_label. Also for some unknown reason option -fdump-final-insns does not show content of jump tables. So at least lets try to find jump_table_datas from plugin
for ( insn = get_insns(); insn; insn = NEXT_INSN(insn) )
- find jump tables
- check that they are unnamed - respecting code_label does not have LABEL_DECL
- add LABEL_DECL with some name
- and put link to RTL with SET_DECL_RTL
<2><11a>: Abbrev Number: 14 (DW_TAG_label)
<11b> DW_AT_name : (indirect string, offset: 0x5f): main_jt52
<11f> DW_AT_decl_file : 1
<120> DW_AT_decl_line : 4
<121> DW_AT_decl_column : 5
<122> DW_AT_byte_size : 10
<123> DW_AT_low_pc : 0x402050
Комментариев нет:
Отправить комментарий