349 lines · plain
1# clang++ -g -gdwarf-5 -emit-llvm -S helper.cpp2# llc -O0 -mtriple=x86_64-unknown-linux-gnu helper.ll3# int z = 0;4# int d = 0;5#6# int helper(int z_, int d_) {7# z += z_;8# d += d_;9# return z * d;10# }11 12 .text13 .file "helper.cpp"14 .file 0 "." "helper.cpp" md5 0xe635924a35b65444173d0c76a54b866f15 .globl _Z6helperii # -- Begin function _Z6helperii16 .p2align 4, 0x9017 .type _Z6helperii,@function18_Z6helperii: # @_Z6helperii19.Lfunc_begin0:20 .loc 0 4 0 # helper.cpp:4:021 .cfi_startproc22# %bb.0: # %entry23 pushq %rbp24 .cfi_def_cfa_offset 1625 .cfi_offset %rbp, -1626 movq %rsp, %rbp27 .cfi_def_cfa_register %rbp28 movl %edi, -4(%rbp)29 movl %esi, -8(%rbp)30.Ltmp0:31 .loc 0 5 7 prologue_end # helper.cpp:5:732 movl -4(%rbp), %eax33 .loc 0 5 4 is_stmt 0 # helper.cpp:5:434 addl z, %eax35 movl %eax, z36 .loc 0 6 7 is_stmt 1 # helper.cpp:6:737 movl -8(%rbp), %eax38 .loc 0 6 4 is_stmt 0 # helper.cpp:6:439 addl d, %eax40 movl %eax, d41 .loc 0 7 9 is_stmt 1 # helper.cpp:7:942 movl z, %eax43 .loc 0 7 11 is_stmt 0 # helper.cpp:7:1144 imull d, %eax45 .loc 0 7 2 # helper.cpp:7:246 popq %rbp47 .cfi_def_cfa %rsp, 848 retq49.Ltmp1:50.Lfunc_end0:51 .size _Z6helperii, .Lfunc_end0-_Z6helperii52 .cfi_endproc53 # -- End function54 .type z,@object # @z55 .bss56 .globl z57 .p2align 258z:59 .long 0 # 0x060 .size z, 461 62 .type d,@object # @d63 .globl d64 .p2align 265d:66 .long 0 # 0x067 .size d, 468 69 .section .debug_abbrev,"",@progbits70 .byte 1 # Abbreviation Code71 .byte 74 # DW_TAG_skeleton_unit72 .byte 0 # DW_CHILDREN_no73 .byte 16 # DW_AT_stmt_list74 .byte 23 # DW_FORM_sec_offset75 .byte 114 # DW_AT_str_offsets_base76 .byte 23 # DW_FORM_sec_offset77 .byte 27 # DW_AT_comp_dir78 .byte 37 # DW_FORM_strx179 .ascii "\264B" # DW_AT_GNU_pubnames80 .byte 25 # DW_FORM_flag_present81 .byte 118 # DW_AT_dwo_name82 .byte 37 # DW_FORM_strx183 .byte 17 # DW_AT_low_pc84 .byte 27 # DW_FORM_addrx85 .byte 18 # DW_AT_high_pc86 .byte 6 # DW_FORM_data487 .byte 115 # DW_AT_addr_base88 .byte 23 # DW_FORM_sec_offset89 .byte 0 # EOM(1)90 .byte 0 # EOM(2)91 .byte 0 # EOM(3)92 .section .debug_info,"",@progbits93.Lcu_begin0:94 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit95.Ldebug_info_start0:96 .short 5 # DWARF version number97 .byte 4 # DWARF Unit Type98 .byte 8 # Address Size (in bytes)99 .long .debug_abbrev # Offset Into Abbrev. Section100 .quad -3815466543033299045101 .byte 1 # Abbrev [1] 0x14:0x14 DW_TAG_skeleton_unit102 .long .Lline_table_start0 # DW_AT_stmt_list103 .long .Lstr_offsets_base0 # DW_AT_str_offsets_base104 .byte 0 # DW_AT_comp_dir105 # DW_AT_GNU_pubnames106 .byte 1 # DW_AT_dwo_name107 .byte 2 # DW_AT_low_pc108 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc109 .long .Laddr_table_base0 # DW_AT_addr_base110.Ldebug_info_end0:111 .section .debug_str_offsets,"",@progbits112 .long 12 # Length of String Offsets Set113 .short 5114 .short 0115.Lstr_offsets_base0:116 .section .debug_str,"MS",@progbits,1117.Lskel_string0:118 .asciz "." # string offset=0119.Lskel_string1:120 .asciz "helper.dwo" # string offset=2121 .section .debug_str_offsets,"",@progbits122 .long .Lskel_string0123 .long .Lskel_string1124 .section .debug_str_offsets.dwo,"e",@progbits125 .long 44 # Length of String Offsets Set126 .short 5127 .short 0128 .section .debug_str.dwo,"eMS",@progbits,1129.Linfo_string0:130 .asciz "z" # string offset=0131.Linfo_string1:132 .asciz "int" # string offset=2133.Linfo_string2:134 .asciz "d" # string offset=6135.Linfo_string3:136 .asciz "_Z6helperii" # string offset=8137.Linfo_string4:138 .asciz "helper" # string offset=20139.Linfo_string5:140 .asciz "z_" # string offset=27141.Linfo_string6:142 .asciz "d_" # string offset=30143.Linfo_string7:144 .asciz "clang version 15.0.0" # string offset=33145.Linfo_string8:146 .asciz "helper.cpp" # string offset=54147.Linfo_string9:148 .asciz "helper.dwo" # string offset=65149 .section .debug_str_offsets.dwo,"e",@progbits150 .long 0151 .long 2152 .long 6153 .long 8154 .long 20155 .long 27156 .long 30157 .long 33158 .long 54159 .long 65160 .section .debug_info.dwo,"e",@progbits161 .long .Ldebug_info_dwo_end0-.Ldebug_info_dwo_start0 # Length of Unit162.Ldebug_info_dwo_start0:163 .short 5 # DWARF version number164 .byte 5 # DWARF Unit Type165 .byte 8 # Address Size (in bytes)166 .long 0 # Offset Into Abbrev. Section167 .quad -3815466543033299045168 .byte 1 # Abbrev [1] 0x14:0x48 DW_TAG_compile_unit169 .byte 7 # DW_AT_producer170 .short 33 # DW_AT_language171 .byte 8 # DW_AT_name172 .byte 9 # DW_AT_dwo_name173 .byte 2 # Abbrev [2] 0x1a:0xb DW_TAG_variable174 .byte 0 # DW_AT_name175 .long 37 # DW_AT_type176 # DW_AT_external177 .byte 0 # DW_AT_decl_file178 .byte 1 # DW_AT_decl_line179 .byte 2 # DW_AT_location180 .byte 161181 .byte 0182 .byte 3 # Abbrev [3] 0x25:0x4 DW_TAG_base_type183 .byte 1 # DW_AT_name184 .byte 5 # DW_AT_encoding185 .byte 4 # DW_AT_byte_size186 .byte 2 # Abbrev [2] 0x29:0xb DW_TAG_variable187 .byte 2 # DW_AT_name188 .long 37 # DW_AT_type189 # DW_AT_external190 .byte 0 # DW_AT_decl_file191 .byte 2 # DW_AT_decl_line192 .byte 2 # DW_AT_location193 .byte 161194 .byte 1195 .byte 4 # Abbrev [4] 0x34:0x27 DW_TAG_subprogram196 .byte 2 # DW_AT_low_pc197 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc198 .byte 1 # DW_AT_frame_base199 .byte 86200 .byte 3 # DW_AT_linkage_name201 .byte 4 # DW_AT_name202 .byte 0 # DW_AT_decl_file203 .byte 4 # DW_AT_decl_line204 .long 37 # DW_AT_type205 # DW_AT_external206 .byte 5 # Abbrev [5] 0x44:0xb DW_TAG_formal_parameter207 .byte 2 # DW_AT_location208 .byte 145209 .byte 124210 .byte 5 # DW_AT_name211 .byte 0 # DW_AT_decl_file212 .byte 4 # DW_AT_decl_line213 .long 37 # DW_AT_type214 .byte 5 # Abbrev [5] 0x4f:0xb DW_TAG_formal_parameter215 .byte 2 # DW_AT_location216 .byte 145217 .byte 120218 .byte 6 # DW_AT_name219 .byte 0 # DW_AT_decl_file220 .byte 4 # DW_AT_decl_line221 .long 37 # DW_AT_type222 .byte 0 # End Of Children Mark223 .byte 0 # End Of Children Mark224.Ldebug_info_dwo_end0:225 .section .debug_abbrev.dwo,"e",@progbits226 .byte 1 # Abbreviation Code227 .byte 17 # DW_TAG_compile_unit228 .byte 1 # DW_CHILDREN_yes229 .byte 37 # DW_AT_producer230 .byte 37 # DW_FORM_strx1231 .byte 19 # DW_AT_language232 .byte 5 # DW_FORM_data2233 .byte 3 # DW_AT_name234 .byte 37 # DW_FORM_strx1235 .byte 118 # DW_AT_dwo_name236 .byte 37 # DW_FORM_strx1237 .byte 0 # EOM(1)238 .byte 0 # EOM(2)239 .byte 2 # Abbreviation Code240 .byte 52 # DW_TAG_variable241 .byte 0 # DW_CHILDREN_no242 .byte 3 # DW_AT_name243 .byte 37 # DW_FORM_strx1244 .byte 73 # DW_AT_type245 .byte 19 # DW_FORM_ref4246 .byte 63 # DW_AT_external247 .byte 25 # DW_FORM_flag_present248 .byte 58 # DW_AT_decl_file249 .byte 11 # DW_FORM_data1250 .byte 59 # DW_AT_decl_line251 .byte 11 # DW_FORM_data1252 .byte 2 # DW_AT_location253 .byte 24 # DW_FORM_exprloc254 .byte 0 # EOM(1)255 .byte 0 # EOM(2)256 .byte 3 # Abbreviation Code257 .byte 36 # DW_TAG_base_type258 .byte 0 # DW_CHILDREN_no259 .byte 3 # DW_AT_name260 .byte 37 # DW_FORM_strx1261 .byte 62 # DW_AT_encoding262 .byte 11 # DW_FORM_data1263 .byte 11 # DW_AT_byte_size264 .byte 11 # DW_FORM_data1265 .byte 0 # EOM(1)266 .byte 0 # EOM(2)267 .byte 4 # Abbreviation Code268 .byte 46 # DW_TAG_subprogram269 .byte 1 # DW_CHILDREN_yes270 .byte 17 # DW_AT_low_pc271 .byte 27 # DW_FORM_addrx272 .byte 18 # DW_AT_high_pc273 .byte 6 # DW_FORM_data4274 .byte 64 # DW_AT_frame_base275 .byte 24 # DW_FORM_exprloc276 .byte 110 # DW_AT_linkage_name277 .byte 37 # DW_FORM_strx1278 .byte 3 # DW_AT_name279 .byte 37 # DW_FORM_strx1280 .byte 58 # DW_AT_decl_file281 .byte 11 # DW_FORM_data1282 .byte 59 # DW_AT_decl_line283 .byte 11 # DW_FORM_data1284 .byte 73 # DW_AT_type285 .byte 19 # DW_FORM_ref4286 .byte 63 # DW_AT_external287 .byte 25 # DW_FORM_flag_present288 .byte 0 # EOM(1)289 .byte 0 # EOM(2)290 .byte 5 # Abbreviation Code291 .byte 5 # DW_TAG_formal_parameter292 .byte 0 # DW_CHILDREN_no293 .byte 2 # DW_AT_location294 .byte 24 # DW_FORM_exprloc295 .byte 3 # DW_AT_name296 .byte 37 # DW_FORM_strx1297 .byte 58 # DW_AT_decl_file298 .byte 11 # DW_FORM_data1299 .byte 59 # DW_AT_decl_line300 .byte 11 # DW_FORM_data1301 .byte 73 # DW_AT_type302 .byte 19 # DW_FORM_ref4303 .byte 0 # EOM(1)304 .byte 0 # EOM(2)305 .byte 0 # EOM(3)306 .section .debug_addr,"",@progbits307 .long .Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution308.Ldebug_addr_start0:309 .short 5 # DWARF version number310 .byte 8 # Address size311 .byte 0 # Segment selector size312.Laddr_table_base0:313 .quad z314 .quad d315 .quad .Lfunc_begin0316.Ldebug_addr_end0:317 .section .debug_gnu_pubnames,"",@progbits318 .long .LpubNames_end0-.LpubNames_start0 # Length of Public Names Info319.LpubNames_start0:320 .short 2 # DWARF Version321 .long .Lcu_begin0 # Offset of Compilation Unit Info322 .long 40 # Compilation Unit Length323 .long 52 # DIE offset324 .byte 48 # Attributes: FUNCTION, EXTERNAL325 .asciz "helper" # External Name326 .long 41 # DIE offset327 .byte 32 # Attributes: VARIABLE, EXTERNAL328 .asciz "d" # External Name329 .long 26 # DIE offset330 .byte 32 # Attributes: VARIABLE, EXTERNAL331 .asciz "z" # External Name332 .long 0 # End Mark333.LpubNames_end0:334 .section .debug_gnu_pubtypes,"",@progbits335 .long .LpubTypes_end0-.LpubTypes_start0 # Length of Public Types Info336.LpubTypes_start0:337 .short 2 # DWARF Version338 .long .Lcu_begin0 # Offset of Compilation Unit Info339 .long 40 # Compilation Unit Length340 .long 37 # DIE offset341 .byte 144 # Attributes: TYPE, STATIC342 .asciz "int" # External Name343 .long 0 # End Mark344.LpubTypes_end0:345 .ident "clang version 15.0.0"346 .section ".note.GNU-stack","",@progbits347 .section .debug_line,"",@progbits348.Lline_table_start0:349