mirror of
https://github.com/intel/llvm.git
synced 2026-01-18 16:50:51 +08:00
[BOLT][DWARF] Convert dwarf5-df-* tests to assembly tests
Reviewed By: ayermolo Differential Revision: https://reviews.llvm.org/D126086
This commit is contained in:
committed by
Alexander Yermolovich
parent
256a52d9aa
commit
e51a6b7374
@@ -1,81 +0,0 @@
|
||||
; clang++ -g -gdwarf-4 -emit-llvm -S helper.cpp
|
||||
; int z = 0;
|
||||
; int d = 0;
|
||||
;
|
||||
; int helper(int z_, int d_) {
|
||||
; z += z_;
|
||||
; d += d_;
|
||||
; return z * d;
|
||||
; }
|
||||
|
||||
; ModuleID = 'helper.cpp'
|
||||
source_filename = "helper.cpp"
|
||||
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
|
||||
target triple = "x86_64-unknown-linux-gnu"
|
||||
|
||||
@z = dso_local global i32 0, align 4, !dbg !0
|
||||
@d = dso_local global i32 0, align 4, !dbg !5
|
||||
|
||||
; Function Attrs: mustprogress noinline nounwind optnone uwtable
|
||||
define dso_local noundef i32 @_Z6helperii(i32 noundef %z_, i32 noundef %d_) #0 !dbg !14 {
|
||||
entry:
|
||||
%z_.addr = alloca i32, align 4
|
||||
%d_.addr = alloca i32, align 4
|
||||
store i32 %z_, i32* %z_.addr, align 4
|
||||
call void @llvm.dbg.declare(metadata i32* %z_.addr, metadata !18, metadata !DIExpression()), !dbg !19
|
||||
store i32 %d_, i32* %d_.addr, align 4
|
||||
call void @llvm.dbg.declare(metadata i32* %d_.addr, metadata !20, metadata !DIExpression()), !dbg !21
|
||||
%0 = load i32, i32* %z_.addr, align 4, !dbg !22
|
||||
%1 = load i32, i32* @z, align 4, !dbg !23
|
||||
%add = add nsw i32 %1, %0, !dbg !23
|
||||
store i32 %add, i32* @z, align 4, !dbg !23
|
||||
%2 = load i32, i32* %d_.addr, align 4, !dbg !24
|
||||
%3 = load i32, i32* @d, align 4, !dbg !25
|
||||
%add1 = add nsw i32 %3, %2, !dbg !25
|
||||
store i32 %add1, i32* @d, align 4, !dbg !25
|
||||
%4 = load i32, i32* @z, align 4, !dbg !26
|
||||
%5 = load i32, i32* @d, align 4, !dbg !27
|
||||
%mul = mul nsw i32 %4, %5, !dbg !28
|
||||
ret i32 %mul, !dbg !29
|
||||
}
|
||||
|
||||
; Function Attrs: nofree nosync nounwind readnone speculatable willreturn
|
||||
declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
|
||||
|
||||
attributes #0 = { mustprogress noinline nounwind optnone uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
|
||||
attributes #1 = { nofree nosync nounwind readnone speculatable willreturn }
|
||||
|
||||
!llvm.dbg.cu = !{!2}
|
||||
!llvm.module.flags = !{!8, !9, !10, !11, !12}
|
||||
!llvm.ident = !{!13}
|
||||
|
||||
!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
|
||||
!1 = distinct !DIGlobalVariable(name: "z", scope: !2, file: !3, line: 1, type: !7, isLocal: false, isDefinition: true)
|
||||
!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !3, producer: "clang version 15.0.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, globals: !4, splitDebugInlining: false, nameTableKind: None)
|
||||
!3 = !DIFile(filename: "helper.cpp", directory: ".")
|
||||
!4 = !{!0, !5}
|
||||
!5 = !DIGlobalVariableExpression(var: !6, expr: !DIExpression())
|
||||
!6 = distinct !DIGlobalVariable(name: "d", scope: !2, file: !3, line: 2, type: !7, isLocal: false, isDefinition: true)
|
||||
!7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
|
||||
!8 = !{i32 7, !"Dwarf Version", i32 4}
|
||||
!9 = !{i32 2, !"Debug Info Version", i32 3}
|
||||
!10 = !{i32 1, !"wchar_size", i32 4}
|
||||
!11 = !{i32 7, !"uwtable", i32 2}
|
||||
!12 = !{i32 7, !"frame-pointer", i32 2}
|
||||
!13 = !{!"clang version 15.0.0"}
|
||||
!14 = distinct !DISubprogram(name: "helper", linkageName: "_Z6helperii", scope: !3, file: !3, line: 4, type: !15, scopeLine: 4, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !17)
|
||||
!15 = !DISubroutineType(types: !16)
|
||||
!16 = !{!7, !7, !7}
|
||||
!17 = !{}
|
||||
!18 = !DILocalVariable(name: "z_", arg: 1, scope: !14, file: !3, line: 4, type: !7)
|
||||
!19 = !DILocation(line: 4, column: 16, scope: !14)
|
||||
!20 = !DILocalVariable(name: "d_", arg: 2, scope: !14, file: !3, line: 4, type: !7)
|
||||
!21 = !DILocation(line: 4, column: 24, scope: !14)
|
||||
!22 = !DILocation(line: 5, column: 7, scope: !14)
|
||||
!23 = !DILocation(line: 5, column: 4, scope: !14)
|
||||
!24 = !DILocation(line: 6, column: 7, scope: !14)
|
||||
!25 = !DILocation(line: 6, column: 4, scope: !14)
|
||||
!26 = !DILocation(line: 7, column: 9, scope: !14)
|
||||
!27 = !DILocation(line: 7, column: 13, scope: !14)
|
||||
!28 = !DILocation(line: 7, column: 11, scope: !14)
|
||||
!29 = !DILocation(line: 7, column: 2, scope: !14)
|
||||
298
bolt/test/X86/Inputs/dwarf4-df-dualcu-helper.s
Normal file
298
bolt/test/X86/Inputs/dwarf4-df-dualcu-helper.s
Normal file
@@ -0,0 +1,298 @@
|
||||
# clang++ -g -gdwarf-4 -emit-llvm -S helper.cpp
|
||||
# llc -O0 -mtriple=x86_64-unknown-linux-gnu helper.ll
|
||||
# int z = 0;
|
||||
# int d = 0;
|
||||
#
|
||||
# int helper(int z_, int d_) {
|
||||
# z += z_;
|
||||
# d += d_;
|
||||
# return z * d;
|
||||
# }
|
||||
|
||||
.text
|
||||
.file "helper.cpp"
|
||||
.file 1 "." "helper.cpp"
|
||||
.globl _Z6helperii # -- Begin function _Z6helperii
|
||||
.p2align 4, 0x90
|
||||
.type _Z6helperii,@function
|
||||
_Z6helperii: # @_Z6helperii
|
||||
.Lfunc_begin0:
|
||||
.loc 1 4 0 # helper.cpp:4:0
|
||||
.cfi_startproc
|
||||
# %bb.0: # %entry
|
||||
pushq %rbp
|
||||
.cfi_def_cfa_offset 16
|
||||
.cfi_offset %rbp, -16
|
||||
movq %rsp, %rbp
|
||||
.cfi_def_cfa_register %rbp
|
||||
movl %edi, -4(%rbp)
|
||||
movl %esi, -8(%rbp)
|
||||
.Ltmp0:
|
||||
.loc 1 5 7 prologue_end # helper.cpp:5:7
|
||||
movl -4(%rbp), %eax
|
||||
.loc 1 5 4 is_stmt 0 # helper.cpp:5:4
|
||||
addl z, %eax
|
||||
movl %eax, z
|
||||
.loc 1 6 7 is_stmt 1 # helper.cpp:6:7
|
||||
movl -8(%rbp), %eax
|
||||
.loc 1 6 4 is_stmt 0 # helper.cpp:6:4
|
||||
addl d, %eax
|
||||
movl %eax, d
|
||||
.loc 1 7 9 is_stmt 1 # helper.cpp:7:9
|
||||
movl z, %eax
|
||||
.loc 1 7 11 is_stmt 0 # helper.cpp:7:11
|
||||
imull d, %eax
|
||||
.loc 1 7 2 # helper.cpp:7:2
|
||||
popq %rbp
|
||||
.cfi_def_cfa %rsp, 8
|
||||
retq
|
||||
.Ltmp1:
|
||||
.Lfunc_end0:
|
||||
.size _Z6helperii, .Lfunc_end0-_Z6helperii
|
||||
.cfi_endproc
|
||||
# -- End function
|
||||
.type z,@object # @z
|
||||
.bss
|
||||
.globl z
|
||||
.p2align 2
|
||||
z:
|
||||
.long 0 # 0x0
|
||||
.size z, 4
|
||||
|
||||
.type d,@object # @d
|
||||
.globl d
|
||||
.p2align 2
|
||||
d:
|
||||
.long 0 # 0x0
|
||||
.size d, 4
|
||||
|
||||
.section .debug_abbrev,"",@progbits
|
||||
.byte 1 # Abbreviation Code
|
||||
.byte 17 # DW_TAG_compile_unit
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 16 # DW_AT_stmt_list
|
||||
.byte 23 # DW_FORM_sec_offset
|
||||
.byte 27 # DW_AT_comp_dir
|
||||
.byte 14 # DW_FORM_strp
|
||||
.ascii "\260B" # DW_AT_GNU_dwo_name
|
||||
.byte 14 # DW_FORM_strp
|
||||
.ascii "\261B" # DW_AT_GNU_dwo_id
|
||||
.byte 7 # DW_FORM_data8
|
||||
.byte 17 # DW_AT_low_pc
|
||||
.byte 1 # DW_FORM_addr
|
||||
.byte 18 # DW_AT_high_pc
|
||||
.byte 6 # DW_FORM_data4
|
||||
.ascii "\263B" # DW_AT_GNU_addr_base
|
||||
.byte 23 # DW_FORM_sec_offset
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 0 # EOM(3)
|
||||
.section .debug_info,"",@progbits
|
||||
.Lcu_begin0:
|
||||
.long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
|
||||
.Ldebug_info_start0:
|
||||
.short 4 # DWARF version number
|
||||
.long .debug_abbrev # Offset Into Abbrev. Section
|
||||
.byte 8 # Address Size (in bytes)
|
||||
.byte 1 # Abbrev [1] 0xb:0x25 DW_TAG_compile_unit
|
||||
.long .Lline_table_start0 # DW_AT_stmt_list
|
||||
.long .Lskel_string0 # DW_AT_comp_dir
|
||||
.long .Lskel_string1 # DW_AT_GNU_dwo_name
|
||||
.quad 9133088002243470176 # DW_AT_GNU_dwo_id
|
||||
.quad .Lfunc_begin0 # DW_AT_low_pc
|
||||
.long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
|
||||
.long .Laddr_table_base0 # DW_AT_GNU_addr_base
|
||||
.Ldebug_info_end0:
|
||||
.section .debug_str,"MS",@progbits,1
|
||||
.Lskel_string0:
|
||||
.asciz "." # string offset=0
|
||||
.Lskel_string1:
|
||||
.asciz "helper.dwo" # string offset=2
|
||||
.section .debug_str.dwo,"eMS",@progbits,1
|
||||
.Linfo_string0:
|
||||
.asciz "z" # string offset=0
|
||||
.Linfo_string1:
|
||||
.asciz "int" # string offset=2
|
||||
.Linfo_string2:
|
||||
.asciz "d" # string offset=6
|
||||
.Linfo_string3:
|
||||
.asciz "_Z6helperii" # string offset=8
|
||||
.Linfo_string4:
|
||||
.asciz "helper" # string offset=20
|
||||
.Linfo_string5:
|
||||
.asciz "z_" # string offset=27
|
||||
.Linfo_string6:
|
||||
.asciz "d_" # string offset=30
|
||||
.Linfo_string7:
|
||||
.asciz "clang version 15.0.0" # string offset=33
|
||||
.Linfo_string8:
|
||||
.asciz "helper.cpp" # string offset=54
|
||||
.Linfo_string9:
|
||||
.asciz "helper.dwo" # string offset=65
|
||||
.section .debug_str_offsets.dwo,"e",@progbits
|
||||
.long 0
|
||||
.long 2
|
||||
.long 6
|
||||
.long 8
|
||||
.long 20
|
||||
.long 27
|
||||
.long 30
|
||||
.long 33
|
||||
.long 54
|
||||
.long 65
|
||||
.section .debug_info.dwo,"e",@progbits
|
||||
.long .Ldebug_info_dwo_end0-.Ldebug_info_dwo_start0 # Length of Unit
|
||||
.Ldebug_info_dwo_start0:
|
||||
.short 4 # DWARF version number
|
||||
.long 0 # Offset Into Abbrev. Section
|
||||
.byte 8 # Address Size (in bytes)
|
||||
.byte 1 # Abbrev [1] 0xb:0x50 DW_TAG_compile_unit
|
||||
.byte 7 # DW_AT_producer
|
||||
.short 33 # DW_AT_language
|
||||
.byte 8 # DW_AT_name
|
||||
.byte 9 # DW_AT_GNU_dwo_name
|
||||
.quad 9133088002243470176 # DW_AT_GNU_dwo_id
|
||||
.byte 2 # Abbrev [2] 0x19:0xb DW_TAG_variable
|
||||
.byte 0 # DW_AT_name
|
||||
.long 36 # DW_AT_type
|
||||
# DW_AT_external
|
||||
.byte 1 # DW_AT_decl_file
|
||||
.byte 1 # DW_AT_decl_line
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 251
|
||||
.byte 0
|
||||
.byte 3 # Abbrev [3] 0x24:0x4 DW_TAG_base_type
|
||||
.byte 1 # DW_AT_name
|
||||
.byte 5 # DW_AT_encoding
|
||||
.byte 4 # DW_AT_byte_size
|
||||
.byte 2 # Abbrev [2] 0x28:0xb DW_TAG_variable
|
||||
.byte 2 # DW_AT_name
|
||||
.long 36 # DW_AT_type
|
||||
# DW_AT_external
|
||||
.byte 1 # DW_AT_decl_file
|
||||
.byte 2 # DW_AT_decl_line
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 251
|
||||
.byte 1
|
||||
.byte 4 # Abbrev [4] 0x33:0x27 DW_TAG_subprogram
|
||||
.byte 2 # DW_AT_low_pc
|
||||
.long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
|
||||
.byte 1 # DW_AT_frame_base
|
||||
.byte 86
|
||||
.byte 3 # DW_AT_linkage_name
|
||||
.byte 4 # DW_AT_name
|
||||
.byte 1 # DW_AT_decl_file
|
||||
.byte 4 # DW_AT_decl_line
|
||||
.long 36 # DW_AT_type
|
||||
# DW_AT_external
|
||||
.byte 5 # Abbrev [5] 0x43:0xb DW_TAG_formal_parameter
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 145
|
||||
.byte 124
|
||||
.byte 5 # DW_AT_name
|
||||
.byte 1 # DW_AT_decl_file
|
||||
.byte 4 # DW_AT_decl_line
|
||||
.long 36 # DW_AT_type
|
||||
.byte 5 # Abbrev [5] 0x4e:0xb DW_TAG_formal_parameter
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 145
|
||||
.byte 120
|
||||
.byte 6 # DW_AT_name
|
||||
.byte 1 # DW_AT_decl_file
|
||||
.byte 4 # DW_AT_decl_line
|
||||
.long 36 # DW_AT_type
|
||||
.byte 0 # End Of Children Mark
|
||||
.byte 0 # End Of Children Mark
|
||||
.Ldebug_info_dwo_end0:
|
||||
.section .debug_abbrev.dwo,"e",@progbits
|
||||
.byte 1 # Abbreviation Code
|
||||
.byte 17 # DW_TAG_compile_unit
|
||||
.byte 1 # DW_CHILDREN_yes
|
||||
.byte 37 # DW_AT_producer
|
||||
.ascii "\202>" # DW_FORM_GNU_str_index
|
||||
.byte 19 # DW_AT_language
|
||||
.byte 5 # DW_FORM_data2
|
||||
.byte 3 # DW_AT_name
|
||||
.ascii "\202>" # DW_FORM_GNU_str_index
|
||||
.ascii "\260B" # DW_AT_GNU_dwo_name
|
||||
.ascii "\202>" # DW_FORM_GNU_str_index
|
||||
.ascii "\261B" # DW_AT_GNU_dwo_id
|
||||
.byte 7 # DW_FORM_data8
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 2 # Abbreviation Code
|
||||
.byte 52 # DW_TAG_variable
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 3 # DW_AT_name
|
||||
.ascii "\202>" # DW_FORM_GNU_str_index
|
||||
.byte 73 # DW_AT_type
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.byte 63 # DW_AT_external
|
||||
.byte 25 # DW_FORM_flag_present
|
||||
.byte 58 # DW_AT_decl_file
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 59 # DW_AT_decl_line
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 24 # DW_FORM_exprloc
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 3 # Abbreviation Code
|
||||
.byte 36 # DW_TAG_base_type
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 3 # DW_AT_name
|
||||
.ascii "\202>" # DW_FORM_GNU_str_index
|
||||
.byte 62 # DW_AT_encoding
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 11 # DW_AT_byte_size
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 4 # Abbreviation Code
|
||||
.byte 46 # DW_TAG_subprogram
|
||||
.byte 1 # DW_CHILDREN_yes
|
||||
.byte 17 # DW_AT_low_pc
|
||||
.ascii "\201>" # DW_FORM_GNU_addr_index
|
||||
.byte 18 # DW_AT_high_pc
|
||||
.byte 6 # DW_FORM_data4
|
||||
.byte 64 # DW_AT_frame_base
|
||||
.byte 24 # DW_FORM_exprloc
|
||||
.byte 110 # DW_AT_linkage_name
|
||||
.ascii "\202>" # DW_FORM_GNU_str_index
|
||||
.byte 3 # DW_AT_name
|
||||
.ascii "\202>" # DW_FORM_GNU_str_index
|
||||
.byte 58 # DW_AT_decl_file
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 59 # DW_AT_decl_line
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 73 # DW_AT_type
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.byte 63 # DW_AT_external
|
||||
.byte 25 # DW_FORM_flag_present
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 5 # Abbreviation Code
|
||||
.byte 5 # DW_TAG_formal_parameter
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 24 # DW_FORM_exprloc
|
||||
.byte 3 # DW_AT_name
|
||||
.ascii "\202>" # DW_FORM_GNU_str_index
|
||||
.byte 58 # DW_AT_decl_file
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 59 # DW_AT_decl_line
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 73 # DW_AT_type
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 0 # EOM(3)
|
||||
.section .debug_addr,"",@progbits
|
||||
.Laddr_table_base0:
|
||||
.quad z
|
||||
.quad d
|
||||
.quad .Lfunc_begin0
|
||||
.ident "clang version 15.0.0"
|
||||
.section ".note.GNU-stack","",@progbits
|
||||
.section .debug_line,"",@progbits
|
||||
.Lline_table_start0:
|
||||
@@ -1,61 +0,0 @@
|
||||
; ModuleID = 'helper.cpp'
|
||||
source_filename = "helper.cpp"
|
||||
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
|
||||
target triple = "x86_64-unknown-linux-gnu"
|
||||
|
||||
@z = dso_local local_unnamed_addr global i32 0, align 4, !dbg !0
|
||||
@d = dso_local local_unnamed_addr global i32 0, align 4, !dbg !5
|
||||
|
||||
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn uwtable
|
||||
define dso_local noundef i32 @_Z6helperii(i32 noundef %z_, i32 noundef %d_) local_unnamed_addr #0 !dbg !13 {
|
||||
entry:
|
||||
call void @llvm.dbg.value(metadata i32 %z_, metadata !17, metadata !DIExpression()), !dbg !19
|
||||
call void @llvm.dbg.value(metadata i32 %d_, metadata !18, metadata !DIExpression()), !dbg !19
|
||||
%0 = load i32, i32* @z, align 4, !dbg !20, !tbaa !21
|
||||
%add = add nsw i32 %0, %z_, !dbg !20
|
||||
store i32 %add, i32* @z, align 4, !dbg !20, !tbaa !21
|
||||
%1 = load i32, i32* @d, align 4, !dbg !25, !tbaa !21
|
||||
%add1 = add nsw i32 %1, %d_, !dbg !25
|
||||
store i32 %add1, i32* @d, align 4, !dbg !25, !tbaa !21
|
||||
%mul = mul nsw i32 %add1, %add, !dbg !26
|
||||
ret i32 %mul, !dbg !27
|
||||
}
|
||||
|
||||
; Function Attrs: nocallback nofree nosync nounwind readnone speculatable willreturn
|
||||
declare void @llvm.dbg.value(metadata, metadata, metadata) #1
|
||||
|
||||
attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn uwtable "frame-pointer"="none" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
|
||||
attributes #1 = { nocallback nofree nosync nounwind readnone speculatable willreturn }
|
||||
|
||||
!llvm.dbg.cu = !{!2}
|
||||
!llvm.module.flags = !{!8, !9, !10, !11}
|
||||
!llvm.ident = !{!12}
|
||||
|
||||
!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
|
||||
!1 = distinct !DIGlobalVariable(name: "z", scope: !2, file: !3, line: 1, type: !7, isLocal: false, isDefinition: true)
|
||||
!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !3, producer: "clang version 15.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, globals: !4, splitDebugInlining: false, nameTableKind: None)
|
||||
!3 = !DIFile(filename: "helper.cpp", directory: ".")
|
||||
!4 = !{!0, !5}
|
||||
!5 = !DIGlobalVariableExpression(var: !6, expr: !DIExpression())
|
||||
!6 = distinct !DIGlobalVariable(name: "d", scope: !2, file: !3, line: 2, type: !7, isLocal: false, isDefinition: true)
|
||||
!7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
|
||||
!8 = !{i32 7, !"Dwarf Version", i32 4}
|
||||
!9 = !{i32 2, !"Debug Info Version", i32 3}
|
||||
!10 = !{i32 1, !"wchar_size", i32 4}
|
||||
!11 = !{i32 7, !"uwtable", i32 2}
|
||||
!12 = !{!"clang version 15.0.0"}
|
||||
!13 = distinct !DISubprogram(name: "helper", linkageName: "_Z6helperii", scope: !3, file: !3, line: 4, type: !14, scopeLine: 4, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !2, retainedNodes: !16)
|
||||
!14 = !DISubroutineType(types: !15)
|
||||
!15 = !{!7, !7, !7}
|
||||
!16 = !{!17, !18}
|
||||
!17 = !DILocalVariable(name: "z_", arg: 1, scope: !13, file: !3, line: 4, type: !7)
|
||||
!18 = !DILocalVariable(name: "d_", arg: 2, scope: !13, file: !3, line: 4, type: !7)
|
||||
!19 = !DILocation(line: 0, scope: !13)
|
||||
!20 = !DILocation(line: 5, column: 4, scope: !13)
|
||||
!21 = !{!22, !22, i64 0}
|
||||
!22 = !{!"int", !23, i64 0}
|
||||
!23 = !{!"omnipotent char", !24, i64 0}
|
||||
!24 = !{!"Simple C++ TBAA"}
|
||||
!25 = !DILocation(line: 6, column: 4, scope: !13)
|
||||
!26 = !DILocation(line: 7, column: 11, scope: !13)
|
||||
!27 = !DILocation(line: 7, column: 2, scope: !13)
|
||||
322
bolt/test/X86/Inputs/dwarf4-df-dualcu-loclist-helper.s
Normal file
322
bolt/test/X86/Inputs/dwarf4-df-dualcu-loclist-helper.s
Normal file
@@ -0,0 +1,322 @@
|
||||
# clang++ -g -gdwarf-4 -emit-llvm -S helper.cpp
|
||||
# llc -O2 -mtriple=x86_64-unknown-linux-gnu helper.ll
|
||||
# int z = 0;
|
||||
# int d = 0;
|
||||
#
|
||||
# int helper(int z_, int d_) {
|
||||
# z += z_;
|
||||
# d += d_;
|
||||
# return z * d;
|
||||
# }
|
||||
|
||||
.text
|
||||
.file "helper.cpp"
|
||||
.file 1 "." "helper.cpp"
|
||||
.globl _Z6helperii # -- Begin function _Z6helperii
|
||||
.p2align 4, 0x90
|
||||
.type _Z6helperii,@function
|
||||
_Z6helperii: # @_Z6helperii
|
||||
.Lfunc_begin0:
|
||||
.loc 1 4 0 # helper.cpp:4:0
|
||||
.cfi_startproc
|
||||
# %bb.0: # %entry
|
||||
#DEBUG_VALUE: helper:z_ <- $edi
|
||||
#DEBUG_VALUE: helper:d_ <- $esi
|
||||
movl %esi, %eax
|
||||
.Ltmp0:
|
||||
.loc 1 5 4 prologue_end # helper.cpp:5:4
|
||||
addl z(%rip), %edi
|
||||
.Ltmp1:
|
||||
#DEBUG_VALUE: helper:z_ <- [DW_OP_LLVM_entry_value 1] $edi
|
||||
.loc 1 6 4 # helper.cpp:6:4
|
||||
addl d(%rip), %eax
|
||||
.loc 1 5 4 # helper.cpp:5:4
|
||||
movl %edi, z(%rip)
|
||||
.loc 1 6 4 # helper.cpp:6:4
|
||||
movl %eax, d(%rip)
|
||||
.loc 1 7 11 # helper.cpp:7:11
|
||||
imull %edi, %eax
|
||||
.loc 1 7 2 is_stmt 0 # helper.cpp:7:2
|
||||
retq
|
||||
.Ltmp2:
|
||||
.Lfunc_end0:
|
||||
.size _Z6helperii, .Lfunc_end0-_Z6helperii
|
||||
.cfi_endproc
|
||||
# -- End function
|
||||
.type z,@object # @z
|
||||
.bss
|
||||
.globl z
|
||||
.p2align 2
|
||||
z:
|
||||
.long 0 # 0x0
|
||||
.size z, 4
|
||||
|
||||
.type d,@object # @d
|
||||
.globl d
|
||||
.p2align 2
|
||||
d:
|
||||
.long 0 # 0x0
|
||||
.size d, 4
|
||||
|
||||
.section .debug_loc.dwo,"e",@progbits
|
||||
.Ldebug_loc0:
|
||||
.byte 3
|
||||
.byte 2
|
||||
.long .Ltmp1-.Lfunc_begin0
|
||||
.short 1 # Loc expr size
|
||||
.byte 85 # super-register DW_OP_reg5
|
||||
.byte 3
|
||||
.byte 3
|
||||
.long .Lfunc_end0-.Ltmp1
|
||||
.short 4 # Loc expr size
|
||||
.byte 243 # DW_OP_GNU_entry_value
|
||||
.byte 1 # 1
|
||||
.byte 85 # super-register DW_OP_reg5
|
||||
.byte 159 # DW_OP_stack_value
|
||||
.byte 0
|
||||
.section .debug_abbrev,"",@progbits
|
||||
.byte 1 # Abbreviation Code
|
||||
.byte 17 # DW_TAG_compile_unit
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 16 # DW_AT_stmt_list
|
||||
.byte 23 # DW_FORM_sec_offset
|
||||
.byte 27 # DW_AT_comp_dir
|
||||
.byte 14 # DW_FORM_strp
|
||||
.ascii "\260B" # DW_AT_GNU_dwo_name
|
||||
.byte 14 # DW_FORM_strp
|
||||
.ascii "\261B" # DW_AT_GNU_dwo_id
|
||||
.byte 7 # DW_FORM_data8
|
||||
.byte 17 # DW_AT_low_pc
|
||||
.byte 1 # DW_FORM_addr
|
||||
.byte 18 # DW_AT_high_pc
|
||||
.byte 6 # DW_FORM_data4
|
||||
.ascii "\263B" # DW_AT_GNU_addr_base
|
||||
.byte 23 # DW_FORM_sec_offset
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 0 # EOM(3)
|
||||
.section .debug_info,"",@progbits
|
||||
.Lcu_begin0:
|
||||
.long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
|
||||
.Ldebug_info_start0:
|
||||
.short 4 # DWARF version number
|
||||
.long .debug_abbrev # Offset Into Abbrev. Section
|
||||
.byte 8 # Address Size (in bytes)
|
||||
.byte 1 # Abbrev [1] 0xb:0x25 DW_TAG_compile_unit
|
||||
.long .Lline_table_start0 # DW_AT_stmt_list
|
||||
.long .Lskel_string0 # DW_AT_comp_dir
|
||||
.long .Lskel_string1 # DW_AT_GNU_dwo_name
|
||||
.quad -5732284259998169791 # DW_AT_GNU_dwo_id
|
||||
.quad .Lfunc_begin0 # DW_AT_low_pc
|
||||
.long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
|
||||
.long .Laddr_table_base0 # DW_AT_GNU_addr_base
|
||||
.Ldebug_info_end0:
|
||||
.section .debug_str,"MS",@progbits,1
|
||||
.Lskel_string0:
|
||||
.asciz "." # string offset=0
|
||||
.Lskel_string1:
|
||||
.asciz "helper.dwo" # string offset=2
|
||||
.section .debug_str.dwo,"eMS",@progbits,1
|
||||
.Linfo_string0:
|
||||
.asciz "z" # string offset=0
|
||||
.Linfo_string1:
|
||||
.asciz "int" # string offset=2
|
||||
.Linfo_string2:
|
||||
.asciz "d" # string offset=6
|
||||
.Linfo_string3:
|
||||
.asciz "_Z6helperii" # string offset=8
|
||||
.Linfo_string4:
|
||||
.asciz "helper" # string offset=20
|
||||
.Linfo_string5:
|
||||
.asciz "z_" # string offset=27
|
||||
.Linfo_string6:
|
||||
.asciz "d_" # string offset=30
|
||||
.Linfo_string7:
|
||||
.asciz "clang version 15.0.0" # string offset=33
|
||||
.Linfo_string8:
|
||||
.asciz "helper.cpp" # string offset=54
|
||||
.Linfo_string9:
|
||||
.asciz "helper.dwo" # string offset=65
|
||||
.section .debug_str_offsets.dwo,"e",@progbits
|
||||
.long 0
|
||||
.long 2
|
||||
.long 6
|
||||
.long 8
|
||||
.long 20
|
||||
.long 27
|
||||
.long 30
|
||||
.long 33
|
||||
.long 54
|
||||
.long 65
|
||||
.section .debug_info.dwo,"e",@progbits
|
||||
.long .Ldebug_info_dwo_end0-.Ldebug_info_dwo_start0 # Length of Unit
|
||||
.Ldebug_info_dwo_start0:
|
||||
.short 4 # DWARF version number
|
||||
.long 0 # Offset Into Abbrev. Section
|
||||
.byte 8 # Address Size (in bytes)
|
||||
.byte 1 # Abbrev [1] 0xb:0x50 DW_TAG_compile_unit
|
||||
.byte 7 # DW_AT_producer
|
||||
.short 33 # DW_AT_language
|
||||
.byte 8 # DW_AT_name
|
||||
.byte 9 # DW_AT_GNU_dwo_name
|
||||
.quad -5732284259998169791 # DW_AT_GNU_dwo_id
|
||||
.byte 2 # Abbrev [2] 0x19:0xb DW_TAG_variable
|
||||
.byte 0 # DW_AT_name
|
||||
.long 36 # DW_AT_type
|
||||
# DW_AT_external
|
||||
.byte 1 # DW_AT_decl_file
|
||||
.byte 1 # DW_AT_decl_line
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 251
|
||||
.byte 0
|
||||
.byte 3 # Abbrev [3] 0x24:0x4 DW_TAG_base_type
|
||||
.byte 1 # DW_AT_name
|
||||
.byte 5 # DW_AT_encoding
|
||||
.byte 4 # DW_AT_byte_size
|
||||
.byte 2 # Abbrev [2] 0x28:0xb DW_TAG_variable
|
||||
.byte 2 # DW_AT_name
|
||||
.long 36 # DW_AT_type
|
||||
# DW_AT_external
|
||||
.byte 1 # DW_AT_decl_file
|
||||
.byte 2 # DW_AT_decl_line
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 251
|
||||
.byte 1
|
||||
.byte 4 # Abbrev [4] 0x33:0x27 DW_TAG_subprogram
|
||||
.byte 2 # DW_AT_low_pc
|
||||
.long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
|
||||
.byte 1 # DW_AT_frame_base
|
||||
.byte 87
|
||||
# DW_AT_GNU_all_call_sites
|
||||
.byte 3 # DW_AT_linkage_name
|
||||
.byte 4 # DW_AT_name
|
||||
.byte 1 # DW_AT_decl_file
|
||||
.byte 4 # DW_AT_decl_line
|
||||
.long 36 # DW_AT_type
|
||||
# DW_AT_external
|
||||
.byte 5 # Abbrev [5] 0x43:0xc DW_TAG_formal_parameter
|
||||
.long .Ldebug_loc0-.debug_loc.dwo # DW_AT_location
|
||||
.byte 5 # DW_AT_name
|
||||
.byte 1 # DW_AT_decl_file
|
||||
.byte 4 # DW_AT_decl_line
|
||||
.long 36 # DW_AT_type
|
||||
.byte 6 # Abbrev [6] 0x4f:0xa DW_TAG_formal_parameter
|
||||
.byte 1 # DW_AT_location
|
||||
.byte 84
|
||||
.byte 6 # DW_AT_name
|
||||
.byte 1 # DW_AT_decl_file
|
||||
.byte 4 # DW_AT_decl_line
|
||||
.long 36 # DW_AT_type
|
||||
.byte 0 # End Of Children Mark
|
||||
.byte 0 # End Of Children Mark
|
||||
.Ldebug_info_dwo_end0:
|
||||
.section .debug_abbrev.dwo,"e",@progbits
|
||||
.byte 1 # Abbreviation Code
|
||||
.byte 17 # DW_TAG_compile_unit
|
||||
.byte 1 # DW_CHILDREN_yes
|
||||
.byte 37 # DW_AT_producer
|
||||
.ascii "\202>" # DW_FORM_GNU_str_index
|
||||
.byte 19 # DW_AT_language
|
||||
.byte 5 # DW_FORM_data2
|
||||
.byte 3 # DW_AT_name
|
||||
.ascii "\202>" # DW_FORM_GNU_str_index
|
||||
.ascii "\260B" # DW_AT_GNU_dwo_name
|
||||
.ascii "\202>" # DW_FORM_GNU_str_index
|
||||
.ascii "\261B" # DW_AT_GNU_dwo_id
|
||||
.byte 7 # DW_FORM_data8
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 2 # Abbreviation Code
|
||||
.byte 52 # DW_TAG_variable
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 3 # DW_AT_name
|
||||
.ascii "\202>" # DW_FORM_GNU_str_index
|
||||
.byte 73 # DW_AT_type
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.byte 63 # DW_AT_external
|
||||
.byte 25 # DW_FORM_flag_present
|
||||
.byte 58 # DW_AT_decl_file
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 59 # DW_AT_decl_line
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 24 # DW_FORM_exprloc
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 3 # Abbreviation Code
|
||||
.byte 36 # DW_TAG_base_type
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 3 # DW_AT_name
|
||||
.ascii "\202>" # DW_FORM_GNU_str_index
|
||||
.byte 62 # DW_AT_encoding
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 11 # DW_AT_byte_size
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 4 # Abbreviation Code
|
||||
.byte 46 # DW_TAG_subprogram
|
||||
.byte 1 # DW_CHILDREN_yes
|
||||
.byte 17 # DW_AT_low_pc
|
||||
.ascii "\201>" # DW_FORM_GNU_addr_index
|
||||
.byte 18 # DW_AT_high_pc
|
||||
.byte 6 # DW_FORM_data4
|
||||
.byte 64 # DW_AT_frame_base
|
||||
.byte 24 # DW_FORM_exprloc
|
||||
.ascii "\227B" # DW_AT_GNU_all_call_sites
|
||||
.byte 25 # DW_FORM_flag_present
|
||||
.byte 110 # DW_AT_linkage_name
|
||||
.ascii "\202>" # DW_FORM_GNU_str_index
|
||||
.byte 3 # DW_AT_name
|
||||
.ascii "\202>" # DW_FORM_GNU_str_index
|
||||
.byte 58 # DW_AT_decl_file
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 59 # DW_AT_decl_line
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 73 # DW_AT_type
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.byte 63 # DW_AT_external
|
||||
.byte 25 # DW_FORM_flag_present
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 5 # Abbreviation Code
|
||||
.byte 5 # DW_TAG_formal_parameter
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 23 # DW_FORM_sec_offset
|
||||
.byte 3 # DW_AT_name
|
||||
.ascii "\202>" # DW_FORM_GNU_str_index
|
||||
.byte 58 # DW_AT_decl_file
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 59 # DW_AT_decl_line
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 73 # DW_AT_type
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 6 # Abbreviation Code
|
||||
.byte 5 # DW_TAG_formal_parameter
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 24 # DW_FORM_exprloc
|
||||
.byte 3 # DW_AT_name
|
||||
.ascii "\202>" # DW_FORM_GNU_str_index
|
||||
.byte 58 # DW_AT_decl_file
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 59 # DW_AT_decl_line
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 73 # DW_AT_type
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 0 # EOM(3)
|
||||
.section .debug_addr,"",@progbits
|
||||
.Laddr_table_base0:
|
||||
.quad z
|
||||
.quad d
|
||||
.quad .Lfunc_begin0
|
||||
.quad .Ltmp1
|
||||
.ident "clang version 15.0.0"
|
||||
.section ".note.GNU-stack","",@progbits
|
||||
.section .debug_line,"",@progbits
|
||||
.Lline_table_start0:
|
||||
@@ -1,99 +0,0 @@
|
||||
; ModuleID = 'main.cpp'
|
||||
source_filename = "main.cpp"
|
||||
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
|
||||
target triple = "x86_64-unknown-linux-gnu"
|
||||
|
||||
@x = dso_local local_unnamed_addr global i32 0, align 4, !dbg !0
|
||||
@y = dso_local local_unnamed_addr global i32 1, align 4, !dbg !5
|
||||
|
||||
; Function Attrs: argmemonly mustprogress nofree norecurse nosync nounwind willreturn uwtable
|
||||
define dso_local void @_Z3usePiS_(i32* nocapture noundef %x, i32* nocapture noundef %y) local_unnamed_addr #0 !dbg !13 {
|
||||
entry:
|
||||
call void @llvm.dbg.value(metadata i32* %x, metadata !18, metadata !DIExpression()), !dbg !20
|
||||
call void @llvm.dbg.value(metadata i32* %y, metadata !19, metadata !DIExpression()), !dbg !20
|
||||
%0 = load i32, i32* %x, align 4, !dbg !21, !tbaa !22
|
||||
%add = add nsw i32 %0, 4, !dbg !21
|
||||
store i32 %add, i32* %x, align 4, !dbg !21, !tbaa !22
|
||||
%1 = load i32, i32* %y, align 4, !dbg !26, !tbaa !22
|
||||
%sub = add nsw i32 %1, -2, !dbg !26
|
||||
store i32 %sub, i32* %y, align 4, !dbg !26, !tbaa !22
|
||||
ret void, !dbg !27
|
||||
}
|
||||
|
||||
; Function Attrs: mustprogress norecurse uwtable
|
||||
define dso_local noundef i32 @main(i32 noundef %argc, i8** nocapture noundef readnone %argv) local_unnamed_addr #1 !dbg !28 {
|
||||
entry:
|
||||
call void @llvm.dbg.value(metadata i32 %argc, metadata !35, metadata !DIExpression()), !dbg !37
|
||||
call void @llvm.dbg.value(metadata i8** %argv, metadata !36, metadata !DIExpression()), !dbg !37
|
||||
call void @llvm.dbg.value(metadata i32* @x, metadata !18, metadata !DIExpression()), !dbg !38
|
||||
call void @llvm.dbg.value(metadata i32* @y, metadata !19, metadata !DIExpression()), !dbg !38
|
||||
%add.i = add nsw i32 %argc, 4, !dbg !40
|
||||
store i32 %add.i, i32* @x, align 4, !dbg !40, !tbaa !22
|
||||
%sub.i = add nsw i32 %argc, 1, !dbg !41
|
||||
store i32 %sub.i, i32* @y, align 4, !dbg !41, !tbaa !22
|
||||
%call = tail call noundef i32 @_Z6helperii(i32 noundef %add.i, i32 noundef %sub.i), !dbg !42
|
||||
ret i32 %call, !dbg !43
|
||||
}
|
||||
|
||||
declare !dbg !44 dso_local noundef i32 @_Z6helperii(i32 noundef, i32 noundef) local_unnamed_addr #2
|
||||
|
||||
; Function Attrs: nocallback nofree nosync nounwind readnone speculatable willreturn
|
||||
declare void @llvm.dbg.value(metadata, metadata, metadata) #3
|
||||
|
||||
attributes #0 = { argmemonly mustprogress nofree norecurse nosync nounwind willreturn uwtable "frame-pointer"="none" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
|
||||
attributes #1 = { mustprogress norecurse uwtable "frame-pointer"="none" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
|
||||
attributes #2 = { "frame-pointer"="none" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
|
||||
attributes #3 = { nocallback nofree nosync nounwind readnone speculatable willreturn }
|
||||
|
||||
!llvm.dbg.cu = !{!2}
|
||||
!llvm.module.flags = !{!8, !9, !10, !11}
|
||||
!llvm.ident = !{!12}
|
||||
|
||||
!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
|
||||
!1 = distinct !DIGlobalVariable(name: "x", scope: !2, file: !3, line: 7, type: !7, isLocal: false, isDefinition: true)
|
||||
!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !3, producer: "clang version 15.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, globals: !4, splitDebugInlining: false, nameTableKind: None)
|
||||
!3 = !DIFile(filename: "main.cpp", directory: ".")
|
||||
!4 = !{!0, !5}
|
||||
!5 = !DIGlobalVariableExpression(var: !6, expr: !DIExpression())
|
||||
!6 = distinct !DIGlobalVariable(name: "y", scope: !2, file: !3, line: 8, type: !7, isLocal: false, isDefinition: true)
|
||||
!7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
|
||||
!8 = !{i32 7, !"Dwarf Version", i32 4}
|
||||
!9 = !{i32 2, !"Debug Info Version", i32 3}
|
||||
!10 = !{i32 1, !"wchar_size", i32 4}
|
||||
!11 = !{i32 7, !"uwtable", i32 2}
|
||||
!12 = !{!"clang version 15.0.0"}
|
||||
!13 = distinct !DISubprogram(name: "use", linkageName: "_Z3usePiS_", scope: !3, file: !3, line: 1, type: !14, scopeLine: 1, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !2, retainedNodes: !17)
|
||||
!14 = !DISubroutineType(types: !15)
|
||||
!15 = !{null, !16, !16}
|
||||
!16 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !7, size: 64)
|
||||
!17 = !{!18, !19}
|
||||
!18 = !DILocalVariable(name: "x", arg: 1, scope: !13, file: !3, line: 1, type: !16)
|
||||
!19 = !DILocalVariable(name: "y", arg: 2, scope: !13, file: !3, line: 1, type: !16)
|
||||
!20 = !DILocation(line: 0, scope: !13)
|
||||
!21 = !DILocation(line: 2, column: 4, scope: !13)
|
||||
!22 = !{!23, !23, i64 0}
|
||||
!23 = !{!"int", !24, i64 0}
|
||||
!24 = !{!"omnipotent char", !25, i64 0}
|
||||
!25 = !{!"Simple C++ TBAA"}
|
||||
!26 = !DILocation(line: 3, column: 4, scope: !13)
|
||||
!27 = !DILocation(line: 4, column: 1, scope: !13)
|
||||
!28 = distinct !DISubprogram(name: "main", scope: !3, file: !3, line: 9, type: !29, scopeLine: 9, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !2, retainedNodes: !34)
|
||||
!29 = !DISubroutineType(types: !30)
|
||||
!30 = !{!7, !7, !31}
|
||||
!31 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !32, size: 64)
|
||||
!32 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !33, size: 64)
|
||||
!33 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char)
|
||||
!34 = !{!35, !36}
|
||||
!35 = !DILocalVariable(name: "argc", arg: 1, scope: !28, file: !3, line: 9, type: !7)
|
||||
!36 = !DILocalVariable(name: "argv", arg: 2, scope: !28, file: !3, line: 9, type: !31)
|
||||
!37 = !DILocation(line: 0, scope: !28)
|
||||
!38 = !DILocation(line: 0, scope: !13, inlinedAt: !39)
|
||||
!39 = distinct !DILocation(line: 12, column: 4, scope: !28)
|
||||
!40 = !DILocation(line: 2, column: 4, scope: !13, inlinedAt: !39)
|
||||
!41 = !DILocation(line: 3, column: 4, scope: !13, inlinedAt: !39)
|
||||
!42 = !DILocation(line: 13, column: 11, scope: !28)
|
||||
!43 = !DILocation(line: 13, column: 4, scope: !28)
|
||||
!44 = !DISubprogram(name: "helper", linkageName: "_Z6helperii", scope: !3, file: !3, line: 6, type: !45, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized, retainedNodes: !47)
|
||||
!45 = !DISubroutineType(types: !46)
|
||||
!46 = !{!7, !7, !7}
|
||||
!47 = !{}
|
||||
546
bolt/test/X86/Inputs/dwarf4-df-dualcu-loclist-main.s
Normal file
546
bolt/test/X86/Inputs/dwarf4-df-dualcu-loclist-main.s
Normal file
@@ -0,0 +1,546 @@
|
||||
# clang++ -g -gdwarf-4 -emit-llvm -S main.cpp
|
||||
# llc -O2 -mtriple=x86_64-unknown-linux-gnu main.ll
|
||||
# void use(int * x, int * y) {
|
||||
# *x += 4;
|
||||
# *y -= 2;
|
||||
# }
|
||||
#
|
||||
# int helper(int z_, int d_);
|
||||
# int x = 0;
|
||||
# int y = 1;
|
||||
# int main(int argc, char *argv[]) {
|
||||
# x = argc;
|
||||
# y = argc + 3;
|
||||
# use(&x, &y);
|
||||
# return helper(x, y);
|
||||
# }
|
||||
|
||||
.text
|
||||
.file "main.cpp"
|
||||
.file 1 "." "main.cpp"
|
||||
.globl _Z3usePiS_ # -- Begin function _Z3usePiS_
|
||||
.p2align 4, 0x90
|
||||
.type _Z3usePiS_,@function
|
||||
_Z3usePiS_: # @_Z3usePiS_
|
||||
.Lfunc_begin0:
|
||||
.loc 1 1 0 # main.cpp:1:0
|
||||
.cfi_startproc
|
||||
# %bb.0: # %entry
|
||||
#DEBUG_VALUE: use:x <- $rdi
|
||||
#DEBUG_VALUE: use:y <- $rsi
|
||||
.loc 1 2 4 prologue_end # main.cpp:2:4
|
||||
addl $4, (%rdi)
|
||||
.loc 1 3 4 # main.cpp:3:4
|
||||
addl $-2, (%rsi)
|
||||
.loc 1 4 1 # main.cpp:4:1
|
||||
retq
|
||||
.Ltmp0:
|
||||
.Lfunc_end0:
|
||||
.size _Z3usePiS_, .Lfunc_end0-_Z3usePiS_
|
||||
.cfi_endproc
|
||||
# -- End function
|
||||
.globl main # -- Begin function main
|
||||
.p2align 4, 0x90
|
||||
.type main,@function
|
||||
main: # @main
|
||||
.Lfunc_begin1:
|
||||
.loc 1 9 0 # main.cpp:9:0
|
||||
.cfi_startproc
|
||||
# %bb.0: # %entry
|
||||
#DEBUG_VALUE: main:argc <- $edi
|
||||
#DEBUG_VALUE: main:argv <- $rsi
|
||||
# kill: def $edi killed $edi def $rdi
|
||||
.loc 1 2 4 prologue_end # main.cpp:2:4
|
||||
leal 4(%rdi), %eax
|
||||
movl %eax, x(%rip)
|
||||
.Ltmp1:
|
||||
#DEBUG_VALUE: use:x <- undef
|
||||
.loc 1 3 4 # main.cpp:3:4
|
||||
leal 1(%rdi), %esi
|
||||
.Ltmp2:
|
||||
#DEBUG_VALUE: main:argv <- [DW_OP_LLVM_entry_value 1] $rsi
|
||||
movl %esi, y(%rip)
|
||||
.Ltmp3:
|
||||
#DEBUG_VALUE: use:y <- undef
|
||||
.loc 1 13 11 # main.cpp:13:11
|
||||
movl %eax, %edi
|
||||
.Ltmp4:
|
||||
#DEBUG_VALUE: main:argc <- [DW_OP_LLVM_entry_value 1] $edi
|
||||
jmp _Z6helperii # TAILCALL
|
||||
.Ltmp5:
|
||||
.Lfunc_end1:
|
||||
.size main, .Lfunc_end1-main
|
||||
.cfi_endproc
|
||||
# -- End function
|
||||
.type x,@object # @x
|
||||
.bss
|
||||
.globl x
|
||||
.p2align 2
|
||||
x:
|
||||
.long 0 # 0x0
|
||||
.size x, 4
|
||||
|
||||
.type y,@object # @y
|
||||
.data
|
||||
.globl y
|
||||
.p2align 2
|
||||
y:
|
||||
.long 1 # 0x1
|
||||
.size y, 4
|
||||
|
||||
.section .debug_loc.dwo,"e",@progbits
|
||||
.Ldebug_loc0:
|
||||
.byte 3
|
||||
.byte 3
|
||||
.long .Ltmp4-.Lfunc_begin1
|
||||
.short 1 # Loc expr size
|
||||
.byte 85 # super-register DW_OP_reg5
|
||||
.byte 3
|
||||
.byte 5
|
||||
.long .Lfunc_end1-.Ltmp4
|
||||
.short 4 # Loc expr size
|
||||
.byte 243 # DW_OP_GNU_entry_value
|
||||
.byte 1 # 1
|
||||
.byte 85 # super-register DW_OP_reg5
|
||||
.byte 159 # DW_OP_stack_value
|
||||
.byte 0
|
||||
.Ldebug_loc1:
|
||||
.byte 3
|
||||
.byte 3
|
||||
.long .Ltmp2-.Lfunc_begin1
|
||||
.short 1 # Loc expr size
|
||||
.byte 84 # DW_OP_reg4
|
||||
.byte 3
|
||||
.byte 6
|
||||
.long .Lfunc_end1-.Ltmp2
|
||||
.short 4 # Loc expr size
|
||||
.byte 243 # DW_OP_GNU_entry_value
|
||||
.byte 1 # 1
|
||||
.byte 84 # DW_OP_reg4
|
||||
.byte 159 # DW_OP_stack_value
|
||||
.byte 0
|
||||
.section .debug_abbrev,"",@progbits
|
||||
.byte 1 # Abbreviation Code
|
||||
.byte 17 # DW_TAG_compile_unit
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 16 # DW_AT_stmt_list
|
||||
.byte 23 # DW_FORM_sec_offset
|
||||
.byte 27 # DW_AT_comp_dir
|
||||
.byte 14 # DW_FORM_strp
|
||||
.ascii "\260B" # DW_AT_GNU_dwo_name
|
||||
.byte 14 # DW_FORM_strp
|
||||
.ascii "\261B" # DW_AT_GNU_dwo_id
|
||||
.byte 7 # DW_FORM_data8
|
||||
.byte 17 # DW_AT_low_pc
|
||||
.byte 1 # DW_FORM_addr
|
||||
.byte 18 # DW_AT_high_pc
|
||||
.byte 6 # DW_FORM_data4
|
||||
.ascii "\263B" # DW_AT_GNU_addr_base
|
||||
.byte 23 # DW_FORM_sec_offset
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 0 # EOM(3)
|
||||
.section .debug_info,"",@progbits
|
||||
.Lcu_begin0:
|
||||
.long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
|
||||
.Ldebug_info_start0:
|
||||
.short 4 # DWARF version number
|
||||
.long .debug_abbrev # Offset Into Abbrev. Section
|
||||
.byte 8 # Address Size (in bytes)
|
||||
.byte 1 # Abbrev [1] 0xb:0x25 DW_TAG_compile_unit
|
||||
.long .Lline_table_start0 # DW_AT_stmt_list
|
||||
.long .Lskel_string0 # DW_AT_comp_dir
|
||||
.long .Lskel_string1 # DW_AT_GNU_dwo_name
|
||||
.quad -4922924650784735988 # DW_AT_GNU_dwo_id
|
||||
.quad .Lfunc_begin0 # DW_AT_low_pc
|
||||
.long .Lfunc_end1-.Lfunc_begin0 # DW_AT_high_pc
|
||||
.long .Laddr_table_base0 # DW_AT_GNU_addr_base
|
||||
.Ldebug_info_end0:
|
||||
.section .debug_str,"MS",@progbits,1
|
||||
.Lskel_string0:
|
||||
.asciz "." # string offset=0
|
||||
.Lskel_string1:
|
||||
.asciz "main.dwo" # string offset=2
|
||||
.section .debug_str.dwo,"eMS",@progbits,1
|
||||
.Linfo_string0:
|
||||
.asciz "x" # string offset=0
|
||||
.Linfo_string1:
|
||||
.asciz "int" # string offset=2
|
||||
.Linfo_string2:
|
||||
.asciz "y" # string offset=6
|
||||
.Linfo_string3:
|
||||
.asciz "_Z3usePiS_" # string offset=8
|
||||
.Linfo_string4:
|
||||
.asciz "use" # string offset=19
|
||||
.Linfo_string5:
|
||||
.asciz "_Z6helperii" # string offset=23
|
||||
.Linfo_string6:
|
||||
.asciz "helper" # string offset=35
|
||||
.Linfo_string7:
|
||||
.asciz "main" # string offset=42
|
||||
.Linfo_string8:
|
||||
.asciz "argc" # string offset=47
|
||||
.Linfo_string9:
|
||||
.asciz "argv" # string offset=52
|
||||
.Linfo_string10:
|
||||
.asciz "char" # string offset=57
|
||||
.Linfo_string11:
|
||||
.asciz "clang version 15.0.0" # string offset=62
|
||||
.Linfo_string12:
|
||||
.asciz "main.cpp" # string offset=83
|
||||
.Linfo_string13:
|
||||
.asciz "main.dwo" # string offset=92
|
||||
.section .debug_str_offsets.dwo,"e",@progbits
|
||||
.long 0
|
||||
.long 2
|
||||
.long 6
|
||||
.long 8
|
||||
.long 19
|
||||
.long 23
|
||||
.long 35
|
||||
.long 42
|
||||
.long 47
|
||||
.long 52
|
||||
.long 57
|
||||
.long 62
|
||||
.long 83
|
||||
.long 92
|
||||
.section .debug_info.dwo,"e",@progbits
|
||||
.long .Ldebug_info_dwo_end0-.Ldebug_info_dwo_start0 # Length of Unit
|
||||
.Ldebug_info_dwo_start0:
|
||||
.short 4 # DWARF version number
|
||||
.long 0 # Offset Into Abbrev. Section
|
||||
.byte 8 # Address Size (in bytes)
|
||||
.byte 1 # Abbrev [1] 0xb:0xbd DW_TAG_compile_unit
|
||||
.byte 11 # DW_AT_producer
|
||||
.short 33 # DW_AT_language
|
||||
.byte 12 # DW_AT_name
|
||||
.byte 13 # DW_AT_GNU_dwo_name
|
||||
.quad -4922924650784735988 # DW_AT_GNU_dwo_id
|
||||
.byte 2 # Abbrev [2] 0x19:0xb DW_TAG_variable
|
||||
.byte 0 # DW_AT_name
|
||||
.long 36 # DW_AT_type
|
||||
# DW_AT_external
|
||||
.byte 1 # DW_AT_decl_file
|
||||
.byte 7 # DW_AT_decl_line
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 251
|
||||
.byte 0
|
||||
.byte 3 # Abbrev [3] 0x24:0x4 DW_TAG_base_type
|
||||
.byte 1 # DW_AT_name
|
||||
.byte 5 # DW_AT_encoding
|
||||
.byte 4 # DW_AT_byte_size
|
||||
.byte 2 # Abbrev [2] 0x28:0xb DW_TAG_variable
|
||||
.byte 2 # DW_AT_name
|
||||
.long 36 # DW_AT_type
|
||||
# DW_AT_external
|
||||
.byte 1 # DW_AT_decl_file
|
||||
.byte 8 # DW_AT_decl_line
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 251
|
||||
.byte 1
|
||||
.byte 4 # Abbrev [4] 0x33:0x1b DW_TAG_subprogram
|
||||
.byte 2 # DW_AT_low_pc
|
||||
.long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
|
||||
.byte 1 # DW_AT_frame_base
|
||||
.byte 87
|
||||
# DW_AT_GNU_all_call_sites
|
||||
.long 78 # DW_AT_abstract_origin
|
||||
.byte 5 # Abbrev [5] 0x3f:0x7 DW_TAG_formal_parameter
|
||||
.byte 1 # DW_AT_location
|
||||
.byte 85
|
||||
.long 84 # DW_AT_abstract_origin
|
||||
.byte 5 # Abbrev [5] 0x46:0x7 DW_TAG_formal_parameter
|
||||
.byte 1 # DW_AT_location
|
||||
.byte 84
|
||||
.long 92 # DW_AT_abstract_origin
|
||||
.byte 0 # End Of Children Mark
|
||||
.byte 6 # Abbrev [6] 0x4e:0x17 DW_TAG_subprogram
|
||||
.byte 3 # DW_AT_linkage_name
|
||||
.byte 4 # DW_AT_name
|
||||
.byte 1 # DW_AT_decl_file
|
||||
.byte 1 # DW_AT_decl_line
|
||||
# DW_AT_external
|
||||
.byte 1 # DW_AT_inline
|
||||
.byte 7 # Abbrev [7] 0x54:0x8 DW_TAG_formal_parameter
|
||||
.byte 0 # DW_AT_name
|
||||
.byte 1 # DW_AT_decl_file
|
||||
.byte 1 # DW_AT_decl_line
|
||||
.long 101 # DW_AT_type
|
||||
.byte 7 # Abbrev [7] 0x5c:0x8 DW_TAG_formal_parameter
|
||||
.byte 2 # DW_AT_name
|
||||
.byte 1 # DW_AT_decl_file
|
||||
.byte 1 # DW_AT_decl_line
|
||||
.long 101 # DW_AT_type
|
||||
.byte 0 # End Of Children Mark
|
||||
.byte 8 # Abbrev [8] 0x65:0x5 DW_TAG_pointer_type
|
||||
.long 36 # DW_AT_type
|
||||
.byte 9 # Abbrev [9] 0x6a:0x3b DW_TAG_subprogram
|
||||
.byte 3 # DW_AT_low_pc
|
||||
.long .Lfunc_end1-.Lfunc_begin1 # DW_AT_high_pc
|
||||
.byte 1 # DW_AT_frame_base
|
||||
.byte 87
|
||||
# DW_AT_GNU_all_call_sites
|
||||
.byte 7 # DW_AT_name
|
||||
.byte 1 # DW_AT_decl_file
|
||||
.byte 9 # DW_AT_decl_line
|
||||
.long 36 # DW_AT_type
|
||||
# DW_AT_external
|
||||
.byte 10 # Abbrev [10] 0x79:0xc DW_TAG_formal_parameter
|
||||
.long .Ldebug_loc0-.debug_loc.dwo # DW_AT_location
|
||||
.byte 8 # DW_AT_name
|
||||
.byte 1 # DW_AT_decl_file
|
||||
.byte 9 # DW_AT_decl_line
|
||||
.long 36 # DW_AT_type
|
||||
.byte 10 # Abbrev [10] 0x85:0xc DW_TAG_formal_parameter
|
||||
.long .Ldebug_loc1-.debug_loc.dwo # DW_AT_location
|
||||
.byte 9 # DW_AT_name
|
||||
.byte 1 # DW_AT_decl_file
|
||||
.byte 9 # DW_AT_decl_line
|
||||
.long 185 # DW_AT_type
|
||||
.byte 11 # Abbrev [11] 0x91:0xd DW_TAG_inlined_subroutine
|
||||
.long 78 # DW_AT_abstract_origin
|
||||
.byte 3 # DW_AT_low_pc
|
||||
.long .Ltmp3-.Lfunc_begin1 # DW_AT_high_pc
|
||||
.byte 1 # DW_AT_call_file
|
||||
.byte 12 # DW_AT_call_line
|
||||
.byte 4 # DW_AT_call_column
|
||||
.byte 12 # Abbrev [12] 0x9e:0x6 DW_TAG_GNU_call_site
|
||||
.long 165 # DW_AT_abstract_origin
|
||||
# DW_AT_GNU_tail_call
|
||||
.byte 4 # DW_AT_low_pc
|
||||
.byte 0 # End Of Children Mark
|
||||
.byte 13 # Abbrev [13] 0xa5:0x14 DW_TAG_subprogram
|
||||
.byte 5 # DW_AT_linkage_name
|
||||
.byte 6 # DW_AT_name
|
||||
.byte 1 # DW_AT_decl_file
|
||||
.byte 6 # DW_AT_decl_line
|
||||
.long 36 # DW_AT_type
|
||||
# DW_AT_declaration
|
||||
# DW_AT_external
|
||||
.byte 14 # Abbrev [14] 0xae:0x5 DW_TAG_formal_parameter
|
||||
.long 36 # DW_AT_type
|
||||
.byte 14 # Abbrev [14] 0xb3:0x5 DW_TAG_formal_parameter
|
||||
.long 36 # DW_AT_type
|
||||
.byte 0 # End Of Children Mark
|
||||
.byte 8 # Abbrev [8] 0xb9:0x5 DW_TAG_pointer_type
|
||||
.long 190 # DW_AT_type
|
||||
.byte 8 # Abbrev [8] 0xbe:0x5 DW_TAG_pointer_type
|
||||
.long 195 # DW_AT_type
|
||||
.byte 3 # Abbrev [3] 0xc3:0x4 DW_TAG_base_type
|
||||
.byte 10 # DW_AT_name
|
||||
.byte 6 # DW_AT_encoding
|
||||
.byte 1 # DW_AT_byte_size
|
||||
.byte 0 # End Of Children Mark
|
||||
.Ldebug_info_dwo_end0:
|
||||
.section .debug_abbrev.dwo,"e",@progbits
|
||||
.byte 1 # Abbreviation Code
|
||||
.byte 17 # DW_TAG_compile_unit
|
||||
.byte 1 # DW_CHILDREN_yes
|
||||
.byte 37 # DW_AT_producer
|
||||
.ascii "\202>" # DW_FORM_GNU_str_index
|
||||
.byte 19 # DW_AT_language
|
||||
.byte 5 # DW_FORM_data2
|
||||
.byte 3 # DW_AT_name
|
||||
.ascii "\202>" # DW_FORM_GNU_str_index
|
||||
.ascii "\260B" # DW_AT_GNU_dwo_name
|
||||
.ascii "\202>" # DW_FORM_GNU_str_index
|
||||
.ascii "\261B" # DW_AT_GNU_dwo_id
|
||||
.byte 7 # DW_FORM_data8
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 2 # Abbreviation Code
|
||||
.byte 52 # DW_TAG_variable
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 3 # DW_AT_name
|
||||
.ascii "\202>" # DW_FORM_GNU_str_index
|
||||
.byte 73 # DW_AT_type
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.byte 63 # DW_AT_external
|
||||
.byte 25 # DW_FORM_flag_present
|
||||
.byte 58 # DW_AT_decl_file
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 59 # DW_AT_decl_line
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 24 # DW_FORM_exprloc
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 3 # Abbreviation Code
|
||||
.byte 36 # DW_TAG_base_type
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 3 # DW_AT_name
|
||||
.ascii "\202>" # DW_FORM_GNU_str_index
|
||||
.byte 62 # DW_AT_encoding
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 11 # DW_AT_byte_size
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 4 # Abbreviation Code
|
||||
.byte 46 # DW_TAG_subprogram
|
||||
.byte 1 # DW_CHILDREN_yes
|
||||
.byte 17 # DW_AT_low_pc
|
||||
.ascii "\201>" # DW_FORM_GNU_addr_index
|
||||
.byte 18 # DW_AT_high_pc
|
||||
.byte 6 # DW_FORM_data4
|
||||
.byte 64 # DW_AT_frame_base
|
||||
.byte 24 # DW_FORM_exprloc
|
||||
.ascii "\227B" # DW_AT_GNU_all_call_sites
|
||||
.byte 25 # DW_FORM_flag_present
|
||||
.byte 49 # DW_AT_abstract_origin
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 5 # Abbreviation Code
|
||||
.byte 5 # DW_TAG_formal_parameter
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 24 # DW_FORM_exprloc
|
||||
.byte 49 # DW_AT_abstract_origin
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 6 # Abbreviation Code
|
||||
.byte 46 # DW_TAG_subprogram
|
||||
.byte 1 # DW_CHILDREN_yes
|
||||
.byte 110 # DW_AT_linkage_name
|
||||
.ascii "\202>" # DW_FORM_GNU_str_index
|
||||
.byte 3 # DW_AT_name
|
||||
.ascii "\202>" # DW_FORM_GNU_str_index
|
||||
.byte 58 # DW_AT_decl_file
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 59 # DW_AT_decl_line
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 63 # DW_AT_external
|
||||
.byte 25 # DW_FORM_flag_present
|
||||
.byte 32 # DW_AT_inline
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 7 # Abbreviation Code
|
||||
.byte 5 # DW_TAG_formal_parameter
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 3 # DW_AT_name
|
||||
.ascii "\202>" # DW_FORM_GNU_str_index
|
||||
.byte 58 # DW_AT_decl_file
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 59 # DW_AT_decl_line
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 73 # DW_AT_type
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 8 # Abbreviation Code
|
||||
.byte 15 # DW_TAG_pointer_type
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 73 # DW_AT_type
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 9 # Abbreviation Code
|
||||
.byte 46 # DW_TAG_subprogram
|
||||
.byte 1 # DW_CHILDREN_yes
|
||||
.byte 17 # DW_AT_low_pc
|
||||
.ascii "\201>" # DW_FORM_GNU_addr_index
|
||||
.byte 18 # DW_AT_high_pc
|
||||
.byte 6 # DW_FORM_data4
|
||||
.byte 64 # DW_AT_frame_base
|
||||
.byte 24 # DW_FORM_exprloc
|
||||
.ascii "\227B" # DW_AT_GNU_all_call_sites
|
||||
.byte 25 # DW_FORM_flag_present
|
||||
.byte 3 # DW_AT_name
|
||||
.ascii "\202>" # DW_FORM_GNU_str_index
|
||||
.byte 58 # DW_AT_decl_file
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 59 # DW_AT_decl_line
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 73 # DW_AT_type
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.byte 63 # DW_AT_external
|
||||
.byte 25 # DW_FORM_flag_present
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 10 # Abbreviation Code
|
||||
.byte 5 # DW_TAG_formal_parameter
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 23 # DW_FORM_sec_offset
|
||||
.byte 3 # DW_AT_name
|
||||
.ascii "\202>" # DW_FORM_GNU_str_index
|
||||
.byte 58 # DW_AT_decl_file
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 59 # DW_AT_decl_line
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 73 # DW_AT_type
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 11 # Abbreviation Code
|
||||
.byte 29 # DW_TAG_inlined_subroutine
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 49 # DW_AT_abstract_origin
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.byte 17 # DW_AT_low_pc
|
||||
.ascii "\201>" # DW_FORM_GNU_addr_index
|
||||
.byte 18 # DW_AT_high_pc
|
||||
.byte 6 # DW_FORM_data4
|
||||
.byte 88 # DW_AT_call_file
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 89 # DW_AT_call_line
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 87 # DW_AT_call_column
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 12 # Abbreviation Code
|
||||
.ascii "\211\202\001" # DW_TAG_GNU_call_site
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 49 # DW_AT_abstract_origin
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.ascii "\225B" # DW_AT_GNU_tail_call
|
||||
.byte 25 # DW_FORM_flag_present
|
||||
.byte 17 # DW_AT_low_pc
|
||||
.ascii "\201>" # DW_FORM_GNU_addr_index
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 13 # Abbreviation Code
|
||||
.byte 46 # DW_TAG_subprogram
|
||||
.byte 1 # DW_CHILDREN_yes
|
||||
.byte 110 # DW_AT_linkage_name
|
||||
.ascii "\202>" # DW_FORM_GNU_str_index
|
||||
.byte 3 # DW_AT_name
|
||||
.ascii "\202>" # DW_FORM_GNU_str_index
|
||||
.byte 58 # DW_AT_decl_file
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 59 # DW_AT_decl_line
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 73 # DW_AT_type
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.byte 60 # DW_AT_declaration
|
||||
.byte 25 # DW_FORM_flag_present
|
||||
.byte 63 # DW_AT_external
|
||||
.byte 25 # DW_FORM_flag_present
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 14 # Abbreviation Code
|
||||
.byte 5 # DW_TAG_formal_parameter
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 73 # DW_AT_type
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 0 # EOM(3)
|
||||
.section .debug_addr,"",@progbits
|
||||
.Laddr_table_base0:
|
||||
.quad x
|
||||
.quad y
|
||||
.quad .Lfunc_begin0
|
||||
.quad .Lfunc_begin1
|
||||
.quad .Ltmp5
|
||||
.quad .Ltmp4
|
||||
.quad .Ltmp2
|
||||
.ident "clang version 15.0.0"
|
||||
.section ".note.GNU-stack","",@progbits
|
||||
.section .debug_line,"",@progbits
|
||||
.Lline_table_start0:
|
||||
@@ -1,129 +0,0 @@
|
||||
; clang++ -g -gdwarf-4 -emit-llvm -S main.cpp
|
||||
; void use(int * x, int * y) {
|
||||
; *x += 4;
|
||||
; *y -= 2;
|
||||
; }
|
||||
;
|
||||
; int helper(int z_, int d_);
|
||||
; int x = 0;
|
||||
; int y = 1;
|
||||
; int main(int argc, char *argv[]) {
|
||||
; x = argc;
|
||||
; y = argc + 3;
|
||||
; use(&x, &y);
|
||||
; return helper(x, y);
|
||||
; }
|
||||
|
||||
; ModuleID = 'main.cpp'
|
||||
source_filename = "main.cpp"
|
||||
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
|
||||
target triple = "x86_64-unknown-linux-gnu"
|
||||
|
||||
@x = dso_local global i32 0, align 4, !dbg !0
|
||||
@y = dso_local global i32 1, align 4, !dbg !5
|
||||
|
||||
; Function Attrs: mustprogress noinline nounwind optnone uwtable
|
||||
define dso_local void @_Z3usePiS_(i32* noundef %x, i32* noundef %y) #0 !dbg !14 {
|
||||
entry:
|
||||
%x.addr = alloca i32*, align 8
|
||||
%y.addr = alloca i32*, align 8
|
||||
store i32* %x, i32** %x.addr, align 8
|
||||
call void @llvm.dbg.declare(metadata i32** %x.addr, metadata !19, metadata !DIExpression()), !dbg !20
|
||||
store i32* %y, i32** %y.addr, align 8
|
||||
call void @llvm.dbg.declare(metadata i32** %y.addr, metadata !21, metadata !DIExpression()), !dbg !22
|
||||
%0 = load i32*, i32** %x.addr, align 8, !dbg !23
|
||||
%1 = load i32, i32* %0, align 4, !dbg !24
|
||||
%add = add nsw i32 %1, 4, !dbg !24
|
||||
store i32 %add, i32* %0, align 4, !dbg !24
|
||||
%2 = load i32*, i32** %y.addr, align 8, !dbg !25
|
||||
%3 = load i32, i32* %2, align 4, !dbg !26
|
||||
%sub = sub nsw i32 %3, 2, !dbg !26
|
||||
store i32 %sub, i32* %2, align 4, !dbg !26
|
||||
ret void, !dbg !27
|
||||
}
|
||||
|
||||
; Function Attrs: nofree nosync nounwind readnone speculatable willreturn
|
||||
declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
|
||||
|
||||
; Function Attrs: mustprogress noinline norecurse optnone uwtable
|
||||
define dso_local noundef i32 @main(i32 noundef %argc, i8** noundef %argv) #2 !dbg !28 {
|
||||
entry:
|
||||
%retval = alloca i32, align 4
|
||||
%argc.addr = alloca i32, align 4
|
||||
%argv.addr = alloca i8**, align 8
|
||||
store i32 0, i32* %retval, align 4
|
||||
store i32 %argc, i32* %argc.addr, align 4
|
||||
call void @llvm.dbg.declare(metadata i32* %argc.addr, metadata !34, metadata !DIExpression()), !dbg !35
|
||||
store i8** %argv, i8*** %argv.addr, align 8
|
||||
call void @llvm.dbg.declare(metadata i8*** %argv.addr, metadata !36, metadata !DIExpression()), !dbg !37
|
||||
%0 = load i32, i32* %argc.addr, align 4, !dbg !38
|
||||
store i32 %0, i32* @x, align 4, !dbg !39
|
||||
%1 = load i32, i32* %argc.addr, align 4, !dbg !40
|
||||
%add = add nsw i32 %1, 3, !dbg !41
|
||||
store i32 %add, i32* @y, align 4, !dbg !42
|
||||
call void @_Z3usePiS_(i32* noundef @x, i32* noundef @y), !dbg !43
|
||||
%2 = load i32, i32* @x, align 4, !dbg !44
|
||||
%3 = load i32, i32* @y, align 4, !dbg !45
|
||||
%call = call noundef i32 @_Z6helperii(i32 noundef %2, i32 noundef %3), !dbg !46
|
||||
ret i32 %call, !dbg !47
|
||||
}
|
||||
|
||||
declare dso_local noundef i32 @_Z6helperii(i32 noundef, i32 noundef) #3
|
||||
|
||||
attributes #0 = { mustprogress noinline nounwind optnone uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
|
||||
attributes #1 = { nofree nosync nounwind readnone speculatable willreturn }
|
||||
attributes #2 = { mustprogress noinline norecurse optnone uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
|
||||
attributes #3 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
|
||||
|
||||
!llvm.dbg.cu = !{!2}
|
||||
!llvm.module.flags = !{!8, !9, !10, !11, !12}
|
||||
!llvm.ident = !{!13}
|
||||
|
||||
!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
|
||||
!1 = distinct !DIGlobalVariable(name: "x", scope: !2, file: !3, line: 7, type: !7, isLocal: false, isDefinition: true)
|
||||
!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !3, producer: "clang version 15.0.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, globals: !4, splitDebugInlining: false, nameTableKind: None)
|
||||
!3 = !DIFile(filename: "main.cpp", directory: ".")
|
||||
!4 = !{!0, !5}
|
||||
!5 = !DIGlobalVariableExpression(var: !6, expr: !DIExpression())
|
||||
!6 = distinct !DIGlobalVariable(name: "y", scope: !2, file: !3, line: 8, type: !7, isLocal: false, isDefinition: true)
|
||||
!7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
|
||||
!8 = !{i32 7, !"Dwarf Version", i32 4}
|
||||
!9 = !{i32 2, !"Debug Info Version", i32 3}
|
||||
!10 = !{i32 1, !"wchar_size", i32 4}
|
||||
!11 = !{i32 7, !"uwtable", i32 2}
|
||||
!12 = !{i32 7, !"frame-pointer", i32 2}
|
||||
!13 = !{!"clang version 15.0.0"}
|
||||
!14 = distinct !DISubprogram(name: "use", linkageName: "_Z3usePiS_", scope: !3, file: !3, line: 1, type: !15, scopeLine: 1, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !18)
|
||||
!15 = !DISubroutineType(types: !16)
|
||||
!16 = !{null, !17, !17}
|
||||
!17 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !7, size: 64)
|
||||
!18 = !{}
|
||||
!19 = !DILocalVariable(name: "x", arg: 1, scope: !14, file: !3, line: 1, type: !17)
|
||||
!20 = !DILocation(line: 1, column: 16, scope: !14)
|
||||
!21 = !DILocalVariable(name: "y", arg: 2, scope: !14, file: !3, line: 1, type: !17)
|
||||
!22 = !DILocation(line: 1, column: 25, scope: !14)
|
||||
!23 = !DILocation(line: 2, column: 2, scope: !14)
|
||||
!24 = !DILocation(line: 2, column: 4, scope: !14)
|
||||
!25 = !DILocation(line: 3, column: 2, scope: !14)
|
||||
!26 = !DILocation(line: 3, column: 4, scope: !14)
|
||||
!27 = !DILocation(line: 4, column: 1, scope: !14)
|
||||
!28 = distinct !DISubprogram(name: "main", scope: !3, file: !3, line: 9, type: !29, scopeLine: 9, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !18)
|
||||
!29 = !DISubroutineType(types: !30)
|
||||
!30 = !{!7, !7, !31}
|
||||
!31 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !32, size: 64)
|
||||
!32 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !33, size: 64)
|
||||
!33 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char)
|
||||
!34 = !DILocalVariable(name: "argc", arg: 1, scope: !28, file: !3, line: 9, type: !7)
|
||||
!35 = !DILocation(line: 9, column: 15, scope: !28)
|
||||
!36 = !DILocalVariable(name: "argv", arg: 2, scope: !28, file: !3, line: 9, type: !31)
|
||||
!37 = !DILocation(line: 9, column: 27, scope: !28)
|
||||
!38 = !DILocation(line: 10, column: 8, scope: !28)
|
||||
!39 = !DILocation(line: 10, column: 6, scope: !28)
|
||||
!40 = !DILocation(line: 11, column: 8, scope: !28)
|
||||
!41 = !DILocation(line: 11, column: 13, scope: !28)
|
||||
!42 = !DILocation(line: 11, column: 6, scope: !28)
|
||||
!43 = !DILocation(line: 12, column: 4, scope: !28)
|
||||
!44 = !DILocation(line: 13, column: 18, scope: !28)
|
||||
!45 = !DILocation(line: 13, column: 21, scope: !28)
|
||||
!46 = !DILocation(line: 13, column: 11, scope: !28)
|
||||
!47 = !DILocation(line: 13, column: 4, scope: !28)
|
||||
420
bolt/test/X86/Inputs/dwarf4-df-dualcu-main.s
Normal file
420
bolt/test/X86/Inputs/dwarf4-df-dualcu-main.s
Normal file
@@ -0,0 +1,420 @@
|
||||
# clang++ -g -gdwarf-4 -emit-llvm -S main.cpp
|
||||
# llc -O0 -mtriple=x86_64-unknown-linux-gnu main.ll
|
||||
# void use(int * x, int * y) {
|
||||
# *x += 4;
|
||||
# *y -= 2;
|
||||
# }
|
||||
#
|
||||
# int helper(int z_, int d_);
|
||||
# int x = 0;
|
||||
# int y = 1;
|
||||
# int main(int argc, char *argv[]) {
|
||||
# x = argc;
|
||||
# y = argc + 3;
|
||||
# use(&x, &y);
|
||||
# return helper(x, y);
|
||||
# }
|
||||
|
||||
.text
|
||||
.file "main.cpp"
|
||||
.file 1 "." "main.cpp"
|
||||
.globl _Z3usePiS_ # -- Begin function _Z3usePiS_
|
||||
.p2align 4, 0x90
|
||||
.type _Z3usePiS_,@function
|
||||
_Z3usePiS_: # @_Z3usePiS_
|
||||
.Lfunc_begin0:
|
||||
.loc 1 1 0 # main.cpp:1:0
|
||||
.cfi_startproc
|
||||
# %bb.0: # %entry
|
||||
pushq %rbp
|
||||
.cfi_def_cfa_offset 16
|
||||
.cfi_offset %rbp, -16
|
||||
movq %rsp, %rbp
|
||||
.cfi_def_cfa_register %rbp
|
||||
movq %rdi, -8(%rbp)
|
||||
movq %rsi, -16(%rbp)
|
||||
.Ltmp0:
|
||||
.loc 1 2 2 prologue_end # main.cpp:2:2
|
||||
movq -8(%rbp), %rax
|
||||
.loc 1 2 4 is_stmt 0 # main.cpp:2:4
|
||||
movl (%rax), %ecx
|
||||
addl $4, %ecx
|
||||
movl %ecx, (%rax)
|
||||
.loc 1 3 2 is_stmt 1 # main.cpp:3:2
|
||||
movq -16(%rbp), %rax
|
||||
.loc 1 3 4 is_stmt 0 # main.cpp:3:4
|
||||
movl (%rax), %ecx
|
||||
subl $2, %ecx
|
||||
movl %ecx, (%rax)
|
||||
.loc 1 4 1 is_stmt 1 # main.cpp:4:1
|
||||
popq %rbp
|
||||
.cfi_def_cfa %rsp, 8
|
||||
retq
|
||||
.Ltmp1:
|
||||
.Lfunc_end0:
|
||||
.size _Z3usePiS_, .Lfunc_end0-_Z3usePiS_
|
||||
.cfi_endproc
|
||||
# -- End function
|
||||
.globl main # -- Begin function main
|
||||
.p2align 4, 0x90
|
||||
.type main,@function
|
||||
main: # @main
|
||||
.Lfunc_begin1:
|
||||
.loc 1 9 0 # main.cpp:9:0
|
||||
.cfi_startproc
|
||||
# %bb.0: # %entry
|
||||
pushq %rbp
|
||||
.cfi_def_cfa_offset 16
|
||||
.cfi_offset %rbp, -16
|
||||
movq %rsp, %rbp
|
||||
.cfi_def_cfa_register %rbp
|
||||
subq $16, %rsp
|
||||
movl $0, -4(%rbp)
|
||||
movl %edi, -8(%rbp)
|
||||
movq %rsi, -16(%rbp)
|
||||
.Ltmp2:
|
||||
.loc 1 10 8 prologue_end # main.cpp:10:8
|
||||
movl -8(%rbp), %eax
|
||||
.loc 1 10 6 is_stmt 0 # main.cpp:10:6
|
||||
movl %eax, x
|
||||
.loc 1 11 8 is_stmt 1 # main.cpp:11:8
|
||||
movl -8(%rbp), %eax
|
||||
.loc 1 11 13 is_stmt 0 # main.cpp:11:13
|
||||
addl $3, %eax
|
||||
.loc 1 11 6 # main.cpp:11:6
|
||||
movl %eax, y
|
||||
.loc 1 12 4 is_stmt 1 # main.cpp:12:4
|
||||
movabsq $x, %rdi
|
||||
movabsq $y, %rsi
|
||||
callq _Z3usePiS_
|
||||
.loc 1 13 18 # main.cpp:13:18
|
||||
movl x, %edi
|
||||
.loc 1 13 21 is_stmt 0 # main.cpp:13:21
|
||||
movl y, %esi
|
||||
.loc 1 13 11 # main.cpp:13:11
|
||||
callq _Z6helperii
|
||||
.loc 1 13 4 # main.cpp:13:4
|
||||
addq $16, %rsp
|
||||
popq %rbp
|
||||
.cfi_def_cfa %rsp, 8
|
||||
retq
|
||||
.Ltmp3:
|
||||
.Lfunc_end1:
|
||||
.size main, .Lfunc_end1-main
|
||||
.cfi_endproc
|
||||
# -- End function
|
||||
.type x,@object # @x
|
||||
.bss
|
||||
.globl x
|
||||
.p2align 2
|
||||
x:
|
||||
.long 0 # 0x0
|
||||
.size x, 4
|
||||
|
||||
.type y,@object # @y
|
||||
.data
|
||||
.globl y
|
||||
.p2align 2
|
||||
y:
|
||||
.long 1 # 0x1
|
||||
.size y, 4
|
||||
|
||||
.section .debug_abbrev,"",@progbits
|
||||
.byte 1 # Abbreviation Code
|
||||
.byte 17 # DW_TAG_compile_unit
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 16 # DW_AT_stmt_list
|
||||
.byte 23 # DW_FORM_sec_offset
|
||||
.byte 27 # DW_AT_comp_dir
|
||||
.byte 14 # DW_FORM_strp
|
||||
.ascii "\260B" # DW_AT_GNU_dwo_name
|
||||
.byte 14 # DW_FORM_strp
|
||||
.ascii "\261B" # DW_AT_GNU_dwo_id
|
||||
.byte 7 # DW_FORM_data8
|
||||
.byte 17 # DW_AT_low_pc
|
||||
.byte 1 # DW_FORM_addr
|
||||
.byte 18 # DW_AT_high_pc
|
||||
.byte 6 # DW_FORM_data4
|
||||
.ascii "\263B" # DW_AT_GNU_addr_base
|
||||
.byte 23 # DW_FORM_sec_offset
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 0 # EOM(3)
|
||||
.section .debug_info,"",@progbits
|
||||
.Lcu_begin0:
|
||||
.long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
|
||||
.Ldebug_info_start0:
|
||||
.short 4 # DWARF version number
|
||||
.long .debug_abbrev # Offset Into Abbrev. Section
|
||||
.byte 8 # Address Size (in bytes)
|
||||
.byte 1 # Abbrev [1] 0xb:0x25 DW_TAG_compile_unit
|
||||
.long .Lline_table_start0 # DW_AT_stmt_list
|
||||
.long .Lskel_string0 # DW_AT_comp_dir
|
||||
.long .Lskel_string1 # DW_AT_GNU_dwo_name
|
||||
.quad 4587139501222431648 # DW_AT_GNU_dwo_id
|
||||
.quad .Lfunc_begin0 # DW_AT_low_pc
|
||||
.long .Lfunc_end1-.Lfunc_begin0 # DW_AT_high_pc
|
||||
.long .Laddr_table_base0 # DW_AT_GNU_addr_base
|
||||
.Ldebug_info_end0:
|
||||
.section .debug_str,"MS",@progbits,1
|
||||
.Lskel_string0:
|
||||
.asciz "." # string offset=0
|
||||
.Lskel_string1:
|
||||
.asciz "main.dwo" # string offset=2
|
||||
.section .debug_str.dwo,"eMS",@progbits,1
|
||||
.Linfo_string0:
|
||||
.asciz "x" # string offset=0
|
||||
.Linfo_string1:
|
||||
.asciz "int" # string offset=2
|
||||
.Linfo_string2:
|
||||
.asciz "y" # string offset=6
|
||||
.Linfo_string3:
|
||||
.asciz "_Z3usePiS_" # string offset=8
|
||||
.Linfo_string4:
|
||||
.asciz "use" # string offset=19
|
||||
.Linfo_string5:
|
||||
.asciz "main" # string offset=23
|
||||
.Linfo_string6:
|
||||
.asciz "argc" # string offset=28
|
||||
.Linfo_string7:
|
||||
.asciz "argv" # string offset=33
|
||||
.Linfo_string8:
|
||||
.asciz "char" # string offset=38
|
||||
.Linfo_string9:
|
||||
.asciz "clang version 15.0.0" # string offset=43
|
||||
.Linfo_string10:
|
||||
.asciz "main.cpp" # string offset=64
|
||||
.Linfo_string11:
|
||||
.asciz "main.dwo" # string offset=73
|
||||
.section .debug_str_offsets.dwo,"e",@progbits
|
||||
.long 0
|
||||
.long 2
|
||||
.long 6
|
||||
.long 8
|
||||
.long 19
|
||||
.long 23
|
||||
.long 28
|
||||
.long 33
|
||||
.long 38
|
||||
.long 43
|
||||
.long 64
|
||||
.long 73
|
||||
.section .debug_info.dwo,"e",@progbits
|
||||
.long .Ldebug_info_dwo_end0-.Ldebug_info_dwo_start0 # Length of Unit
|
||||
.Ldebug_info_dwo_start0:
|
||||
.short 4 # DWARF version number
|
||||
.long 0 # Offset Into Abbrev. Section
|
||||
.byte 8 # Address Size (in bytes)
|
||||
.byte 1 # Abbrev [1] 0xb:0x85 DW_TAG_compile_unit
|
||||
.byte 9 # DW_AT_producer
|
||||
.short 33 # DW_AT_language
|
||||
.byte 10 # DW_AT_name
|
||||
.byte 11 # DW_AT_GNU_dwo_name
|
||||
.quad 4587139501222431648 # DW_AT_GNU_dwo_id
|
||||
.byte 2 # Abbrev [2] 0x19:0xb DW_TAG_variable
|
||||
.byte 0 # DW_AT_name
|
||||
.long 36 # DW_AT_type
|
||||
# DW_AT_external
|
||||
.byte 1 # DW_AT_decl_file
|
||||
.byte 7 # DW_AT_decl_line
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 251
|
||||
.byte 0
|
||||
.byte 3 # Abbrev [3] 0x24:0x4 DW_TAG_base_type
|
||||
.byte 1 # DW_AT_name
|
||||
.byte 5 # DW_AT_encoding
|
||||
.byte 4 # DW_AT_byte_size
|
||||
.byte 2 # Abbrev [2] 0x28:0xb DW_TAG_variable
|
||||
.byte 2 # DW_AT_name
|
||||
.long 36 # DW_AT_type
|
||||
# DW_AT_external
|
||||
.byte 1 # DW_AT_decl_file
|
||||
.byte 8 # DW_AT_decl_line
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 251
|
||||
.byte 1
|
||||
.byte 4 # Abbrev [4] 0x33:0x23 DW_TAG_subprogram
|
||||
.byte 2 # DW_AT_low_pc
|
||||
.long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
|
||||
.byte 1 # DW_AT_frame_base
|
||||
.byte 86
|
||||
.byte 3 # DW_AT_linkage_name
|
||||
.byte 4 # DW_AT_name
|
||||
.byte 1 # DW_AT_decl_file
|
||||
.byte 1 # DW_AT_decl_line
|
||||
# DW_AT_external
|
||||
.byte 5 # Abbrev [5] 0x3f:0xb DW_TAG_formal_parameter
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 145
|
||||
.byte 120
|
||||
.byte 0 # DW_AT_name
|
||||
.byte 1 # DW_AT_decl_file
|
||||
.byte 1 # DW_AT_decl_line
|
||||
.long 124 # DW_AT_type
|
||||
.byte 5 # Abbrev [5] 0x4a:0xb DW_TAG_formal_parameter
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 145
|
||||
.byte 112
|
||||
.byte 2 # DW_AT_name
|
||||
.byte 1 # DW_AT_decl_file
|
||||
.byte 1 # DW_AT_decl_line
|
||||
.long 124 # DW_AT_type
|
||||
.byte 0 # End Of Children Mark
|
||||
.byte 6 # Abbrev [6] 0x56:0x26 DW_TAG_subprogram
|
||||
.byte 3 # DW_AT_low_pc
|
||||
.long .Lfunc_end1-.Lfunc_begin1 # DW_AT_high_pc
|
||||
.byte 1 # DW_AT_frame_base
|
||||
.byte 86
|
||||
.byte 5 # DW_AT_name
|
||||
.byte 1 # DW_AT_decl_file
|
||||
.byte 9 # DW_AT_decl_line
|
||||
.long 36 # DW_AT_type
|
||||
# DW_AT_external
|
||||
.byte 5 # Abbrev [5] 0x65:0xb DW_TAG_formal_parameter
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 145
|
||||
.byte 120
|
||||
.byte 6 # DW_AT_name
|
||||
.byte 1 # DW_AT_decl_file
|
||||
.byte 9 # DW_AT_decl_line
|
||||
.long 36 # DW_AT_type
|
||||
.byte 5 # Abbrev [5] 0x70:0xb DW_TAG_formal_parameter
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 145
|
||||
.byte 112
|
||||
.byte 7 # DW_AT_name
|
||||
.byte 1 # DW_AT_decl_file
|
||||
.byte 9 # DW_AT_decl_line
|
||||
.long 129 # DW_AT_type
|
||||
.byte 0 # End Of Children Mark
|
||||
.byte 7 # Abbrev [7] 0x7c:0x5 DW_TAG_pointer_type
|
||||
.long 36 # DW_AT_type
|
||||
.byte 7 # Abbrev [7] 0x81:0x5 DW_TAG_pointer_type
|
||||
.long 134 # DW_AT_type
|
||||
.byte 7 # Abbrev [7] 0x86:0x5 DW_TAG_pointer_type
|
||||
.long 139 # DW_AT_type
|
||||
.byte 3 # Abbrev [3] 0x8b:0x4 DW_TAG_base_type
|
||||
.byte 8 # DW_AT_name
|
||||
.byte 6 # DW_AT_encoding
|
||||
.byte 1 # DW_AT_byte_size
|
||||
.byte 0 # End Of Children Mark
|
||||
.Ldebug_info_dwo_end0:
|
||||
.section .debug_abbrev.dwo,"e",@progbits
|
||||
.byte 1 # Abbreviation Code
|
||||
.byte 17 # DW_TAG_compile_unit
|
||||
.byte 1 # DW_CHILDREN_yes
|
||||
.byte 37 # DW_AT_producer
|
||||
.ascii "\202>" # DW_FORM_GNU_str_index
|
||||
.byte 19 # DW_AT_language
|
||||
.byte 5 # DW_FORM_data2
|
||||
.byte 3 # DW_AT_name
|
||||
.ascii "\202>" # DW_FORM_GNU_str_index
|
||||
.ascii "\260B" # DW_AT_GNU_dwo_name
|
||||
.ascii "\202>" # DW_FORM_GNU_str_index
|
||||
.ascii "\261B" # DW_AT_GNU_dwo_id
|
||||
.byte 7 # DW_FORM_data8
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 2 # Abbreviation Code
|
||||
.byte 52 # DW_TAG_variable
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 3 # DW_AT_name
|
||||
.ascii "\202>" # DW_FORM_GNU_str_index
|
||||
.byte 73 # DW_AT_type
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.byte 63 # DW_AT_external
|
||||
.byte 25 # DW_FORM_flag_present
|
||||
.byte 58 # DW_AT_decl_file
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 59 # DW_AT_decl_line
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 24 # DW_FORM_exprloc
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 3 # Abbreviation Code
|
||||
.byte 36 # DW_TAG_base_type
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 3 # DW_AT_name
|
||||
.ascii "\202>" # DW_FORM_GNU_str_index
|
||||
.byte 62 # DW_AT_encoding
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 11 # DW_AT_byte_size
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 4 # Abbreviation Code
|
||||
.byte 46 # DW_TAG_subprogram
|
||||
.byte 1 # DW_CHILDREN_yes
|
||||
.byte 17 # DW_AT_low_pc
|
||||
.ascii "\201>" # DW_FORM_GNU_addr_index
|
||||
.byte 18 # DW_AT_high_pc
|
||||
.byte 6 # DW_FORM_data4
|
||||
.byte 64 # DW_AT_frame_base
|
||||
.byte 24 # DW_FORM_exprloc
|
||||
.byte 110 # DW_AT_linkage_name
|
||||
.ascii "\202>" # DW_FORM_GNU_str_index
|
||||
.byte 3 # DW_AT_name
|
||||
.ascii "\202>" # DW_FORM_GNU_str_index
|
||||
.byte 58 # DW_AT_decl_file
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 59 # DW_AT_decl_line
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 63 # DW_AT_external
|
||||
.byte 25 # DW_FORM_flag_present
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 5 # Abbreviation Code
|
||||
.byte 5 # DW_TAG_formal_parameter
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 24 # DW_FORM_exprloc
|
||||
.byte 3 # DW_AT_name
|
||||
.ascii "\202>" # DW_FORM_GNU_str_index
|
||||
.byte 58 # DW_AT_decl_file
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 59 # DW_AT_decl_line
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 73 # DW_AT_type
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 6 # Abbreviation Code
|
||||
.byte 46 # DW_TAG_subprogram
|
||||
.byte 1 # DW_CHILDREN_yes
|
||||
.byte 17 # DW_AT_low_pc
|
||||
.ascii "\201>" # DW_FORM_GNU_addr_index
|
||||
.byte 18 # DW_AT_high_pc
|
||||
.byte 6 # DW_FORM_data4
|
||||
.byte 64 # DW_AT_frame_base
|
||||
.byte 24 # DW_FORM_exprloc
|
||||
.byte 3 # DW_AT_name
|
||||
.ascii "\202>" # DW_FORM_GNU_str_index
|
||||
.byte 58 # DW_AT_decl_file
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 59 # DW_AT_decl_line
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 73 # DW_AT_type
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.byte 63 # DW_AT_external
|
||||
.byte 25 # DW_FORM_flag_present
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 7 # Abbreviation Code
|
||||
.byte 15 # DW_TAG_pointer_type
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 73 # DW_AT_type
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 0 # EOM(3)
|
||||
.section .debug_addr,"",@progbits
|
||||
.Laddr_table_base0:
|
||||
.quad x
|
||||
.quad y
|
||||
.quad .Lfunc_begin0
|
||||
.quad .Lfunc_begin1
|
||||
.ident "clang version 15.0.0"
|
||||
.section ".note.GNU-stack","",@progbits
|
||||
.section .debug_line,"",@progbits
|
||||
.Lline_table_start0:
|
||||
@@ -1,81 +0,0 @@
|
||||
; clang++ -g -gdwarf-5 -emit-llvm -S helper.cpp
|
||||
; int z = 0;
|
||||
; int d = 0;
|
||||
;
|
||||
; int helper(int z_, int d_) {
|
||||
; z += z_;
|
||||
; d += d_;
|
||||
; return z * d;
|
||||
; }
|
||||
|
||||
; ModuleID = 'helper.cpp'
|
||||
source_filename = "helper.cpp"
|
||||
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
|
||||
target triple = "x86_64-unknown-linux-gnu"
|
||||
|
||||
@z = dso_local global i32 0, align 4, !dbg !0
|
||||
@d = dso_local global i32 0, align 4, !dbg !5
|
||||
|
||||
; Function Attrs: mustprogress noinline nounwind optnone uwtable
|
||||
define dso_local noundef i32 @_Z6helperii(i32 noundef %z_, i32 noundef %d_) #0 !dbg !14 {
|
||||
entry:
|
||||
%z_.addr = alloca i32, align 4
|
||||
%d_.addr = alloca i32, align 4
|
||||
store i32 %z_, i32* %z_.addr, align 4
|
||||
call void @llvm.dbg.declare(metadata i32* %z_.addr, metadata !18, metadata !DIExpression()), !dbg !19
|
||||
store i32 %d_, i32* %d_.addr, align 4
|
||||
call void @llvm.dbg.declare(metadata i32* %d_.addr, metadata !20, metadata !DIExpression()), !dbg !21
|
||||
%0 = load i32, i32* %z_.addr, align 4, !dbg !22
|
||||
%1 = load i32, i32* @z, align 4, !dbg !23
|
||||
%add = add nsw i32 %1, %0, !dbg !23
|
||||
store i32 %add, i32* @z, align 4, !dbg !23
|
||||
%2 = load i32, i32* %d_.addr, align 4, !dbg !24
|
||||
%3 = load i32, i32* @d, align 4, !dbg !25
|
||||
%add1 = add nsw i32 %3, %2, !dbg !25
|
||||
store i32 %add1, i32* @d, align 4, !dbg !25
|
||||
%4 = load i32, i32* @z, align 4, !dbg !26
|
||||
%5 = load i32, i32* @d, align 4, !dbg !27
|
||||
%mul = mul nsw i32 %4, %5, !dbg !28
|
||||
ret i32 %mul, !dbg !29
|
||||
}
|
||||
|
||||
; Function Attrs: nofree nosync nounwind readnone speculatable willreturn
|
||||
declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
|
||||
|
||||
attributes #0 = { mustprogress noinline nounwind optnone uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
|
||||
attributes #1 = { nofree nosync nounwind readnone speculatable willreturn }
|
||||
|
||||
!llvm.dbg.cu = !{!2}
|
||||
!llvm.module.flags = !{!8, !9, !10, !11, !12}
|
||||
!llvm.ident = !{!13}
|
||||
|
||||
!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
|
||||
!1 = distinct !DIGlobalVariable(name: "z", scope: !2, file: !3, line: 1, type: !7, isLocal: false, isDefinition: true)
|
||||
!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !3, producer: "clang version 15.0.0", isOptimized: false, runtimeVersion: 0, splitDebugFilename: "helper.dwo", emissionKind: FullDebug, globals: !4, splitDebugInlining: false, nameTableKind: GNU)
|
||||
!3 = !DIFile(filename: "helper.cpp", directory: ".", checksumkind: CSK_MD5, checksum: "e635924a35b65444173d0c76a54b866f")
|
||||
!4 = !{!0, !5}
|
||||
!5 = !DIGlobalVariableExpression(var: !6, expr: !DIExpression())
|
||||
!6 = distinct !DIGlobalVariable(name: "d", scope: !2, file: !3, line: 2, type: !7, isLocal: false, isDefinition: true)
|
||||
!7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
|
||||
!8 = !{i32 7, !"Dwarf Version", i32 5}
|
||||
!9 = !{i32 2, !"Debug Info Version", i32 3}
|
||||
!10 = !{i32 1, !"wchar_size", i32 4}
|
||||
!11 = !{i32 7, !"uwtable", i32 2}
|
||||
!12 = !{i32 7, !"frame-pointer", i32 2}
|
||||
!13 = !{!"clang version 15.0.0"}
|
||||
!14 = distinct !DISubprogram(name: "helper", linkageName: "_Z6helperii", scope: !3, file: !3, line: 4, type: !15, scopeLine: 4, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !17)
|
||||
!15 = !DISubroutineType(types: !16)
|
||||
!16 = !{!7, !7, !7}
|
||||
!17 = !{}
|
||||
!18 = !DILocalVariable(name: "z_", arg: 1, scope: !14, file: !3, line: 4, type: !7)
|
||||
!19 = !DILocation(line: 4, column: 16, scope: !14)
|
||||
!20 = !DILocalVariable(name: "d_", arg: 2, scope: !14, file: !3, line: 4, type: !7)
|
||||
!21 = !DILocation(line: 4, column: 24, scope: !14)
|
||||
!22 = !DILocation(line: 5, column: 7, scope: !14)
|
||||
!23 = !DILocation(line: 5, column: 4, scope: !14)
|
||||
!24 = !DILocation(line: 6, column: 7, scope: !14)
|
||||
!25 = !DILocation(line: 6, column: 4, scope: !14)
|
||||
!26 = !DILocation(line: 7, column: 9, scope: !14)
|
||||
!27 = !DILocation(line: 7, column: 13, scope: !14)
|
||||
!28 = !DILocation(line: 7, column: 11, scope: !14)
|
||||
!29 = !DILocation(line: 7, column: 2, scope: !14)
|
||||
348
bolt/test/X86/Inputs/dwarf5-df-dualcu-helper.s
Normal file
348
bolt/test/X86/Inputs/dwarf5-df-dualcu-helper.s
Normal file
@@ -0,0 +1,348 @@
|
||||
# clang++ -g -gdwarf-5 -emit-llvm -S helper.cpp
|
||||
# llc -O0 -mtriple=x86_64-unknown-linux-gnu helper.ll
|
||||
# int z = 0;
|
||||
# int d = 0;
|
||||
#
|
||||
# int helper(int z_, int d_) {
|
||||
# z += z_;
|
||||
# d += d_;
|
||||
# return z * d;
|
||||
# }
|
||||
|
||||
.text
|
||||
.file "helper.cpp"
|
||||
.file 0 "." "helper.cpp" md5 0xe635924a35b65444173d0c76a54b866f
|
||||
.globl _Z6helperii # -- Begin function _Z6helperii
|
||||
.p2align 4, 0x90
|
||||
.type _Z6helperii,@function
|
||||
_Z6helperii: # @_Z6helperii
|
||||
.Lfunc_begin0:
|
||||
.loc 0 4 0 # helper.cpp:4:0
|
||||
.cfi_startproc
|
||||
# %bb.0: # %entry
|
||||
pushq %rbp
|
||||
.cfi_def_cfa_offset 16
|
||||
.cfi_offset %rbp, -16
|
||||
movq %rsp, %rbp
|
||||
.cfi_def_cfa_register %rbp
|
||||
movl %edi, -4(%rbp)
|
||||
movl %esi, -8(%rbp)
|
||||
.Ltmp0:
|
||||
.loc 0 5 7 prologue_end # helper.cpp:5:7
|
||||
movl -4(%rbp), %eax
|
||||
.loc 0 5 4 is_stmt 0 # helper.cpp:5:4
|
||||
addl z, %eax
|
||||
movl %eax, z
|
||||
.loc 0 6 7 is_stmt 1 # helper.cpp:6:7
|
||||
movl -8(%rbp), %eax
|
||||
.loc 0 6 4 is_stmt 0 # helper.cpp:6:4
|
||||
addl d, %eax
|
||||
movl %eax, d
|
||||
.loc 0 7 9 is_stmt 1 # helper.cpp:7:9
|
||||
movl z, %eax
|
||||
.loc 0 7 11 is_stmt 0 # helper.cpp:7:11
|
||||
imull d, %eax
|
||||
.loc 0 7 2 # helper.cpp:7:2
|
||||
popq %rbp
|
||||
.cfi_def_cfa %rsp, 8
|
||||
retq
|
||||
.Ltmp1:
|
||||
.Lfunc_end0:
|
||||
.size _Z6helperii, .Lfunc_end0-_Z6helperii
|
||||
.cfi_endproc
|
||||
# -- End function
|
||||
.type z,@object # @z
|
||||
.bss
|
||||
.globl z
|
||||
.p2align 2
|
||||
z:
|
||||
.long 0 # 0x0
|
||||
.size z, 4
|
||||
|
||||
.type d,@object # @d
|
||||
.globl d
|
||||
.p2align 2
|
||||
d:
|
||||
.long 0 # 0x0
|
||||
.size d, 4
|
||||
|
||||
.section .debug_abbrev,"",@progbits
|
||||
.byte 1 # Abbreviation Code
|
||||
.byte 74 # DW_TAG_skeleton_unit
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 16 # DW_AT_stmt_list
|
||||
.byte 23 # DW_FORM_sec_offset
|
||||
.byte 114 # DW_AT_str_offsets_base
|
||||
.byte 23 # DW_FORM_sec_offset
|
||||
.byte 27 # DW_AT_comp_dir
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.ascii "\264B" # DW_AT_GNU_pubnames
|
||||
.byte 25 # DW_FORM_flag_present
|
||||
.byte 118 # DW_AT_dwo_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 17 # DW_AT_low_pc
|
||||
.byte 27 # DW_FORM_addrx
|
||||
.byte 18 # DW_AT_high_pc
|
||||
.byte 6 # DW_FORM_data4
|
||||
.byte 115 # DW_AT_addr_base
|
||||
.byte 23 # DW_FORM_sec_offset
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 0 # EOM(3)
|
||||
.section .debug_info,"",@progbits
|
||||
.Lcu_begin0:
|
||||
.long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
|
||||
.Ldebug_info_start0:
|
||||
.short 5 # DWARF version number
|
||||
.byte 4 # DWARF Unit Type
|
||||
.byte 8 # Address Size (in bytes)
|
||||
.long .debug_abbrev # Offset Into Abbrev. Section
|
||||
.quad -3815466543033299045
|
||||
.byte 1 # Abbrev [1] 0x14:0x14 DW_TAG_skeleton_unit
|
||||
.long .Lline_table_start0 # DW_AT_stmt_list
|
||||
.long .Lstr_offsets_base0 # DW_AT_str_offsets_base
|
||||
.byte 0 # DW_AT_comp_dir
|
||||
# DW_AT_GNU_pubnames
|
||||
.byte 1 # DW_AT_dwo_name
|
||||
.byte 2 # DW_AT_low_pc
|
||||
.long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
|
||||
.long .Laddr_table_base0 # DW_AT_addr_base
|
||||
.Ldebug_info_end0:
|
||||
.section .debug_str_offsets,"",@progbits
|
||||
.long 12 # Length of String Offsets Set
|
||||
.short 5
|
||||
.short 0
|
||||
.Lstr_offsets_base0:
|
||||
.section .debug_str,"MS",@progbits,1
|
||||
.Lskel_string0:
|
||||
.asciz "." # string offset=0
|
||||
.Lskel_string1:
|
||||
.asciz "helper.dwo" # string offset=2
|
||||
.section .debug_str_offsets,"",@progbits
|
||||
.long .Lskel_string0
|
||||
.long .Lskel_string1
|
||||
.section .debug_str_offsets.dwo,"e",@progbits
|
||||
.long 44 # Length of String Offsets Set
|
||||
.short 5
|
||||
.short 0
|
||||
.section .debug_str.dwo,"eMS",@progbits,1
|
||||
.Linfo_string0:
|
||||
.asciz "z" # string offset=0
|
||||
.Linfo_string1:
|
||||
.asciz "int" # string offset=2
|
||||
.Linfo_string2:
|
||||
.asciz "d" # string offset=6
|
||||
.Linfo_string3:
|
||||
.asciz "_Z6helperii" # string offset=8
|
||||
.Linfo_string4:
|
||||
.asciz "helper" # string offset=20
|
||||
.Linfo_string5:
|
||||
.asciz "z_" # string offset=27
|
||||
.Linfo_string6:
|
||||
.asciz "d_" # string offset=30
|
||||
.Linfo_string7:
|
||||
.asciz "clang version 15.0.0" # string offset=33
|
||||
.Linfo_string8:
|
||||
.asciz "helper.cpp" # string offset=54
|
||||
.Linfo_string9:
|
||||
.asciz "helper.dwo" # string offset=65
|
||||
.section .debug_str_offsets.dwo,"e",@progbits
|
||||
.long 0
|
||||
.long 2
|
||||
.long 6
|
||||
.long 8
|
||||
.long 20
|
||||
.long 27
|
||||
.long 30
|
||||
.long 33
|
||||
.long 54
|
||||
.long 65
|
||||
.section .debug_info.dwo,"e",@progbits
|
||||
.long .Ldebug_info_dwo_end0-.Ldebug_info_dwo_start0 # Length of Unit
|
||||
.Ldebug_info_dwo_start0:
|
||||
.short 5 # DWARF version number
|
||||
.byte 5 # DWARF Unit Type
|
||||
.byte 8 # Address Size (in bytes)
|
||||
.long 0 # Offset Into Abbrev. Section
|
||||
.quad -3815466543033299045
|
||||
.byte 1 # Abbrev [1] 0x14:0x48 DW_TAG_compile_unit
|
||||
.byte 7 # DW_AT_producer
|
||||
.short 33 # DW_AT_language
|
||||
.byte 8 # DW_AT_name
|
||||
.byte 9 # DW_AT_dwo_name
|
||||
.byte 2 # Abbrev [2] 0x1a:0xb DW_TAG_variable
|
||||
.byte 0 # DW_AT_name
|
||||
.long 37 # DW_AT_type
|
||||
# DW_AT_external
|
||||
.byte 0 # DW_AT_decl_file
|
||||
.byte 1 # DW_AT_decl_line
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 161
|
||||
.byte 0
|
||||
.byte 3 # Abbrev [3] 0x25:0x4 DW_TAG_base_type
|
||||
.byte 1 # DW_AT_name
|
||||
.byte 5 # DW_AT_encoding
|
||||
.byte 4 # DW_AT_byte_size
|
||||
.byte 2 # Abbrev [2] 0x29:0xb DW_TAG_variable
|
||||
.byte 2 # DW_AT_name
|
||||
.long 37 # DW_AT_type
|
||||
# DW_AT_external
|
||||
.byte 0 # DW_AT_decl_file
|
||||
.byte 2 # DW_AT_decl_line
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 161
|
||||
.byte 1
|
||||
.byte 4 # Abbrev [4] 0x34:0x27 DW_TAG_subprogram
|
||||
.byte 2 # DW_AT_low_pc
|
||||
.long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
|
||||
.byte 1 # DW_AT_frame_base
|
||||
.byte 86
|
||||
.byte 3 # DW_AT_linkage_name
|
||||
.byte 4 # DW_AT_name
|
||||
.byte 0 # DW_AT_decl_file
|
||||
.byte 4 # DW_AT_decl_line
|
||||
.long 37 # DW_AT_type
|
||||
# DW_AT_external
|
||||
.byte 5 # Abbrev [5] 0x44:0xb DW_TAG_formal_parameter
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 145
|
||||
.byte 124
|
||||
.byte 5 # DW_AT_name
|
||||
.byte 0 # DW_AT_decl_file
|
||||
.byte 4 # DW_AT_decl_line
|
||||
.long 37 # DW_AT_type
|
||||
.byte 5 # Abbrev [5] 0x4f:0xb DW_TAG_formal_parameter
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 145
|
||||
.byte 120
|
||||
.byte 6 # DW_AT_name
|
||||
.byte 0 # DW_AT_decl_file
|
||||
.byte 4 # DW_AT_decl_line
|
||||
.long 37 # DW_AT_type
|
||||
.byte 0 # End Of Children Mark
|
||||
.byte 0 # End Of Children Mark
|
||||
.Ldebug_info_dwo_end0:
|
||||
.section .debug_abbrev.dwo,"e",@progbits
|
||||
.byte 1 # Abbreviation Code
|
||||
.byte 17 # DW_TAG_compile_unit
|
||||
.byte 1 # DW_CHILDREN_yes
|
||||
.byte 37 # DW_AT_producer
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 19 # DW_AT_language
|
||||
.byte 5 # DW_FORM_data2
|
||||
.byte 3 # DW_AT_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 118 # DW_AT_dwo_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 2 # Abbreviation Code
|
||||
.byte 52 # DW_TAG_variable
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 3 # DW_AT_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 73 # DW_AT_type
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.byte 63 # DW_AT_external
|
||||
.byte 25 # DW_FORM_flag_present
|
||||
.byte 58 # DW_AT_decl_file
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 59 # DW_AT_decl_line
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 24 # DW_FORM_exprloc
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 3 # Abbreviation Code
|
||||
.byte 36 # DW_TAG_base_type
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 3 # DW_AT_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 62 # DW_AT_encoding
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 11 # DW_AT_byte_size
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 4 # Abbreviation Code
|
||||
.byte 46 # DW_TAG_subprogram
|
||||
.byte 1 # DW_CHILDREN_yes
|
||||
.byte 17 # DW_AT_low_pc
|
||||
.byte 27 # DW_FORM_addrx
|
||||
.byte 18 # DW_AT_high_pc
|
||||
.byte 6 # DW_FORM_data4
|
||||
.byte 64 # DW_AT_frame_base
|
||||
.byte 24 # DW_FORM_exprloc
|
||||
.byte 110 # DW_AT_linkage_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 3 # DW_AT_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 58 # DW_AT_decl_file
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 59 # DW_AT_decl_line
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 73 # DW_AT_type
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.byte 63 # DW_AT_external
|
||||
.byte 25 # DW_FORM_flag_present
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 5 # Abbreviation Code
|
||||
.byte 5 # DW_TAG_formal_parameter
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 24 # DW_FORM_exprloc
|
||||
.byte 3 # DW_AT_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 58 # DW_AT_decl_file
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 59 # DW_AT_decl_line
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 73 # DW_AT_type
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 0 # EOM(3)
|
||||
.section .debug_addr,"",@progbits
|
||||
.long .Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution
|
||||
.Ldebug_addr_start0:
|
||||
.short 5 # DWARF version number
|
||||
.byte 8 # Address size
|
||||
.byte 0 # Segment selector size
|
||||
.Laddr_table_base0:
|
||||
.quad z
|
||||
.quad d
|
||||
.quad .Lfunc_begin0
|
||||
.Ldebug_addr_end0:
|
||||
.section .debug_gnu_pubnames,"",@progbits
|
||||
.long .LpubNames_end0-.LpubNames_start0 # Length of Public Names Info
|
||||
.LpubNames_start0:
|
||||
.short 2 # DWARF Version
|
||||
.long .Lcu_begin0 # Offset of Compilation Unit Info
|
||||
.long 40 # Compilation Unit Length
|
||||
.long 52 # DIE offset
|
||||
.byte 48 # Attributes: FUNCTION, EXTERNAL
|
||||
.asciz "helper" # External Name
|
||||
.long 41 # DIE offset
|
||||
.byte 32 # Attributes: VARIABLE, EXTERNAL
|
||||
.asciz "d" # External Name
|
||||
.long 26 # DIE offset
|
||||
.byte 32 # Attributes: VARIABLE, EXTERNAL
|
||||
.asciz "z" # External Name
|
||||
.long 0 # End Mark
|
||||
.LpubNames_end0:
|
||||
.section .debug_gnu_pubtypes,"",@progbits
|
||||
.long .LpubTypes_end0-.LpubTypes_start0 # Length of Public Types Info
|
||||
.LpubTypes_start0:
|
||||
.short 2 # DWARF Version
|
||||
.long .Lcu_begin0 # Offset of Compilation Unit Info
|
||||
.long 40 # Compilation Unit Length
|
||||
.long 37 # DIE offset
|
||||
.byte 144 # Attributes: TYPE, STATIC
|
||||
.asciz "int" # External Name
|
||||
.long 0 # End Mark
|
||||
.LpubTypes_end0:
|
||||
.ident "clang version 15.0.0"
|
||||
.section ".note.GNU-stack","",@progbits
|
||||
.section .debug_line,"",@progbits
|
||||
.Lline_table_start0:
|
||||
@@ -1,61 +0,0 @@
|
||||
; ModuleID = 'helper.cpp'
|
||||
source_filename = "helper.cpp"
|
||||
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
|
||||
target triple = "x86_64-unknown-linux-gnu"
|
||||
|
||||
@z = dso_local local_unnamed_addr global i32 0, align 4, !dbg !0
|
||||
@d = dso_local local_unnamed_addr global i32 0, align 4, !dbg !5
|
||||
|
||||
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn uwtable
|
||||
define dso_local noundef i32 @_Z6helperii(i32 noundef %z_, i32 noundef %d_) local_unnamed_addr #0 !dbg !13 {
|
||||
entry:
|
||||
call void @llvm.dbg.value(metadata i32 %z_, metadata !17, metadata !DIExpression()), !dbg !19
|
||||
call void @llvm.dbg.value(metadata i32 %d_, metadata !18, metadata !DIExpression()), !dbg !19
|
||||
%0 = load i32, i32* @z, align 4, !dbg !20, !tbaa !21
|
||||
%add = add nsw i32 %0, %z_, !dbg !20
|
||||
store i32 %add, i32* @z, align 4, !dbg !20, !tbaa !21
|
||||
%1 = load i32, i32* @d, align 4, !dbg !25, !tbaa !21
|
||||
%add1 = add nsw i32 %1, %d_, !dbg !25
|
||||
store i32 %add1, i32* @d, align 4, !dbg !25, !tbaa !21
|
||||
%mul = mul nsw i32 %add1, %add, !dbg !26
|
||||
ret i32 %mul, !dbg !27
|
||||
}
|
||||
|
||||
; Function Attrs: nocallback nofree nosync nounwind readnone speculatable willreturn
|
||||
declare void @llvm.dbg.value(metadata, metadata, metadata) #1
|
||||
|
||||
attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn uwtable "frame-pointer"="none" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
|
||||
attributes #1 = { nocallback nofree nosync nounwind readnone speculatable willreturn }
|
||||
|
||||
!llvm.dbg.cu = !{!2}
|
||||
!llvm.module.flags = !{!8, !9, !10, !11}
|
||||
!llvm.ident = !{!12}
|
||||
|
||||
!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
|
||||
!1 = distinct !DIGlobalVariable(name: "z", scope: !2, file: !3, line: 1, type: !7, isLocal: false, isDefinition: true)
|
||||
!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !3, producer: "clang version 15.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, globals: !4, splitDebugInlining: false, nameTableKind: None)
|
||||
!3 = !DIFile(filename: "helper.cpp", directory: ".", checksumkind: CSK_MD5, checksum: "e635924a35b65444173d0c76a54b866f")
|
||||
!4 = !{!0, !5}
|
||||
!5 = !DIGlobalVariableExpression(var: !6, expr: !DIExpression())
|
||||
!6 = distinct !DIGlobalVariable(name: "d", scope: !2, file: !3, line: 2, type: !7, isLocal: false, isDefinition: true)
|
||||
!7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
|
||||
!8 = !{i32 7, !"Dwarf Version", i32 5}
|
||||
!9 = !{i32 2, !"Debug Info Version", i32 3}
|
||||
!10 = !{i32 1, !"wchar_size", i32 4}
|
||||
!11 = !{i32 7, !"uwtable", i32 2}
|
||||
!12 = !{!"clang version 15.0.0"}
|
||||
!13 = distinct !DISubprogram(name: "helper", linkageName: "_Z6helperii", scope: !3, file: !3, line: 4, type: !14, scopeLine: 4, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !2, retainedNodes: !16)
|
||||
!14 = !DISubroutineType(types: !15)
|
||||
!15 = !{!7, !7, !7}
|
||||
!16 = !{!17, !18}
|
||||
!17 = !DILocalVariable(name: "z_", arg: 1, scope: !13, file: !3, line: 4, type: !7)
|
||||
!18 = !DILocalVariable(name: "d_", arg: 2, scope: !13, file: !3, line: 4, type: !7)
|
||||
!19 = !DILocation(line: 0, scope: !13)
|
||||
!20 = !DILocation(line: 5, column: 4, scope: !13)
|
||||
!21 = !{!22, !22, i64 0}
|
||||
!22 = !{!"int", !23, i64 0}
|
||||
!23 = !{!"omnipotent char", !24, i64 0}
|
||||
!24 = !{!"Simple C++ TBAA"}
|
||||
!25 = !DILocation(line: 6, column: 4, scope: !13)
|
||||
!26 = !DILocation(line: 7, column: 11, scope: !13)
|
||||
!27 = !DILocation(line: 7, column: 2, scope: !13)
|
||||
351
bolt/test/X86/Inputs/dwarf5-df-dualcu-loclist-helper.s
Normal file
351
bolt/test/X86/Inputs/dwarf5-df-dualcu-loclist-helper.s
Normal file
@@ -0,0 +1,351 @@
|
||||
# clang++ -g -gdwarf-5 -emit-llvm -S helper.cpp
|
||||
# llc -O2 -mtriple=x86_64-unknown-linux-gnu helper.ll
|
||||
# int z = 0;
|
||||
# int d = 0;
|
||||
#
|
||||
# int helper(int z_, int d_) {
|
||||
# z += z_;
|
||||
# d += d_;
|
||||
# return z * d;
|
||||
# }
|
||||
|
||||
.text
|
||||
.file "helper.cpp"
|
||||
.file 0 "." "helper.cpp" md5 0xe635924a35b65444173d0c76a54b866f
|
||||
.globl _Z6helperii # -- Begin function _Z6helperii
|
||||
.p2align 4, 0x90
|
||||
.type _Z6helperii,@function
|
||||
_Z6helperii: # @_Z6helperii
|
||||
.Lfunc_begin0:
|
||||
.loc 0 4 0 # helper.cpp:4:0
|
||||
.cfi_startproc
|
||||
# %bb.0: # %entry
|
||||
#DEBUG_VALUE: helper:z_ <- $edi
|
||||
#DEBUG_VALUE: helper:d_ <- $esi
|
||||
movl %esi, %eax
|
||||
.Ltmp0:
|
||||
.loc 0 5 4 prologue_end # helper.cpp:5:4
|
||||
addl z(%rip), %edi
|
||||
.Ltmp1:
|
||||
#DEBUG_VALUE: helper:z_ <- [DW_OP_LLVM_entry_value 1] $edi
|
||||
.loc 0 6 4 # helper.cpp:6:4
|
||||
addl d(%rip), %eax
|
||||
.loc 0 5 4 # helper.cpp:5:4
|
||||
movl %edi, z(%rip)
|
||||
.loc 0 6 4 # helper.cpp:6:4
|
||||
movl %eax, d(%rip)
|
||||
.loc 0 7 11 # helper.cpp:7:11
|
||||
imull %edi, %eax
|
||||
.loc 0 7 2 is_stmt 0 # helper.cpp:7:2
|
||||
retq
|
||||
.Ltmp2:
|
||||
.Lfunc_end0:
|
||||
.size _Z6helperii, .Lfunc_end0-_Z6helperii
|
||||
.cfi_endproc
|
||||
# -- End function
|
||||
.type z,@object # @z
|
||||
.bss
|
||||
.globl z
|
||||
.p2align 2
|
||||
z:
|
||||
.long 0 # 0x0
|
||||
.size z, 4
|
||||
|
||||
.type d,@object # @d
|
||||
.globl d
|
||||
.p2align 2
|
||||
d:
|
||||
.long 0 # 0x0
|
||||
.size d, 4
|
||||
|
||||
.section .debug_loclists.dwo,"e",@progbits
|
||||
.long .Ldebug_list_header_end0-.Ldebug_list_header_start0 # Length
|
||||
.Ldebug_list_header_start0:
|
||||
.short 5 # Version
|
||||
.byte 8 # Address size
|
||||
.byte 0 # Segment selector size
|
||||
.long 1 # Offset entry count
|
||||
.Lloclists_table_base0:
|
||||
.long .Ldebug_loc0-.Lloclists_table_base0
|
||||
.Ldebug_loc0:
|
||||
.byte 1 # DW_LLE_base_addressx
|
||||
.byte 2 # base address index
|
||||
.byte 4 # DW_LLE_offset_pair
|
||||
.uleb128 .Lfunc_begin0-.Lfunc_begin0 # starting offset
|
||||
.uleb128 .Ltmp1-.Lfunc_begin0 # ending offset
|
||||
.byte 1 # Loc expr size
|
||||
.byte 85 # super-register DW_OP_reg5
|
||||
.byte 4 # DW_LLE_offset_pair
|
||||
.uleb128 .Ltmp1-.Lfunc_begin0 # starting offset
|
||||
.uleb128 .Lfunc_end0-.Lfunc_begin0 # ending offset
|
||||
.byte 4 # Loc expr size
|
||||
.byte 163 # DW_OP_entry_value
|
||||
.byte 1 # 1
|
||||
.byte 85 # super-register DW_OP_reg5
|
||||
.byte 159 # DW_OP_stack_value
|
||||
.byte 0 # DW_LLE_end_of_list
|
||||
.Ldebug_list_header_end0:
|
||||
.section .debug_abbrev,"",@progbits
|
||||
.byte 1 # Abbreviation Code
|
||||
.byte 74 # DW_TAG_skeleton_unit
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 16 # DW_AT_stmt_list
|
||||
.byte 23 # DW_FORM_sec_offset
|
||||
.byte 114 # DW_AT_str_offsets_base
|
||||
.byte 23 # DW_FORM_sec_offset
|
||||
.byte 27 # DW_AT_comp_dir
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 118 # DW_AT_dwo_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 17 # DW_AT_low_pc
|
||||
.byte 27 # DW_FORM_addrx
|
||||
.byte 18 # DW_AT_high_pc
|
||||
.byte 6 # DW_FORM_data4
|
||||
.byte 115 # DW_AT_addr_base
|
||||
.byte 23 # DW_FORM_sec_offset
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 0 # EOM(3)
|
||||
.section .debug_info,"",@progbits
|
||||
.Lcu_begin0:
|
||||
.long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
|
||||
.Ldebug_info_start0:
|
||||
.short 5 # DWARF version number
|
||||
.byte 4 # DWARF Unit Type
|
||||
.byte 8 # Address Size (in bytes)
|
||||
.long .debug_abbrev # Offset Into Abbrev. Section
|
||||
.quad 9211989493039430794
|
||||
.byte 1 # Abbrev [1] 0x14:0x14 DW_TAG_skeleton_unit
|
||||
.long .Lline_table_start0 # DW_AT_stmt_list
|
||||
.long .Lstr_offsets_base0 # DW_AT_str_offsets_base
|
||||
.byte 0 # DW_AT_comp_dir
|
||||
.byte 1 # DW_AT_dwo_name
|
||||
.byte 2 # DW_AT_low_pc
|
||||
.long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
|
||||
.long .Laddr_table_base0 # DW_AT_addr_base
|
||||
.Ldebug_info_end0:
|
||||
.section .debug_str_offsets,"",@progbits
|
||||
.long 12 # Length of String Offsets Set
|
||||
.short 5
|
||||
.short 0
|
||||
.Lstr_offsets_base0:
|
||||
.section .debug_str,"MS",@progbits,1
|
||||
.Lskel_string0:
|
||||
.asciz "." # string offset=0
|
||||
.Lskel_string1:
|
||||
.asciz "helper.dwo" # string offset=2
|
||||
.section .debug_str_offsets,"",@progbits
|
||||
.long .Lskel_string0
|
||||
.long .Lskel_string1
|
||||
.section .debug_str_offsets.dwo,"e",@progbits
|
||||
.long 44 # Length of String Offsets Set
|
||||
.short 5
|
||||
.short 0
|
||||
.section .debug_str.dwo,"eMS",@progbits,1
|
||||
.Linfo_string0:
|
||||
.asciz "z" # string offset=0
|
||||
.Linfo_string1:
|
||||
.asciz "int" # string offset=2
|
||||
.Linfo_string2:
|
||||
.asciz "d" # string offset=6
|
||||
.Linfo_string3:
|
||||
.asciz "_Z6helperii" # string offset=8
|
||||
.Linfo_string4:
|
||||
.asciz "helper" # string offset=20
|
||||
.Linfo_string5:
|
||||
.asciz "z_" # string offset=27
|
||||
.Linfo_string6:
|
||||
.asciz "d_" # string offset=30
|
||||
.Linfo_string7:
|
||||
.asciz "clang version 15.0.0" # string offset=33
|
||||
.Linfo_string8:
|
||||
.asciz "helper.cpp" # string offset=54
|
||||
.Linfo_string9:
|
||||
.asciz "helper.dwo" # string offset=65
|
||||
.section .debug_str_offsets.dwo,"e",@progbits
|
||||
.long 0
|
||||
.long 2
|
||||
.long 6
|
||||
.long 8
|
||||
.long 20
|
||||
.long 27
|
||||
.long 30
|
||||
.long 33
|
||||
.long 54
|
||||
.long 65
|
||||
.section .debug_info.dwo,"e",@progbits
|
||||
.long .Ldebug_info_dwo_end0-.Ldebug_info_dwo_start0 # Length of Unit
|
||||
.Ldebug_info_dwo_start0:
|
||||
.short 5 # DWARF version number
|
||||
.byte 5 # DWARF Unit Type
|
||||
.byte 8 # Address Size (in bytes)
|
||||
.long 0 # Offset Into Abbrev. Section
|
||||
.quad 9211989493039430794
|
||||
.byte 1 # Abbrev [1] 0x14:0x45 DW_TAG_compile_unit
|
||||
.byte 7 # DW_AT_producer
|
||||
.short 33 # DW_AT_language
|
||||
.byte 8 # DW_AT_name
|
||||
.byte 9 # DW_AT_dwo_name
|
||||
.byte 2 # Abbrev [2] 0x1a:0xb DW_TAG_variable
|
||||
.byte 0 # DW_AT_name
|
||||
.long 37 # DW_AT_type
|
||||
# DW_AT_external
|
||||
.byte 0 # DW_AT_decl_file
|
||||
.byte 1 # DW_AT_decl_line
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 161
|
||||
.byte 0
|
||||
.byte 3 # Abbrev [3] 0x25:0x4 DW_TAG_base_type
|
||||
.byte 1 # DW_AT_name
|
||||
.byte 5 # DW_AT_encoding
|
||||
.byte 4 # DW_AT_byte_size
|
||||
.byte 2 # Abbrev [2] 0x29:0xb DW_TAG_variable
|
||||
.byte 2 # DW_AT_name
|
||||
.long 37 # DW_AT_type
|
||||
# DW_AT_external
|
||||
.byte 0 # DW_AT_decl_file
|
||||
.byte 2 # DW_AT_decl_line
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 161
|
||||
.byte 1
|
||||
.byte 4 # Abbrev [4] 0x34:0x24 DW_TAG_subprogram
|
||||
.byte 2 # DW_AT_low_pc
|
||||
.long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
|
||||
.byte 1 # DW_AT_frame_base
|
||||
.byte 87
|
||||
# DW_AT_call_all_calls
|
||||
.byte 3 # DW_AT_linkage_name
|
||||
.byte 4 # DW_AT_name
|
||||
.byte 0 # DW_AT_decl_file
|
||||
.byte 4 # DW_AT_decl_line
|
||||
.long 37 # DW_AT_type
|
||||
# DW_AT_external
|
||||
.byte 5 # Abbrev [5] 0x44:0x9 DW_TAG_formal_parameter
|
||||
.byte 0 # DW_AT_location
|
||||
.byte 5 # DW_AT_name
|
||||
.byte 0 # DW_AT_decl_file
|
||||
.byte 4 # DW_AT_decl_line
|
||||
.long 37 # DW_AT_type
|
||||
.byte 6 # Abbrev [6] 0x4d:0xa DW_TAG_formal_parameter
|
||||
.byte 1 # DW_AT_location
|
||||
.byte 84
|
||||
.byte 6 # DW_AT_name
|
||||
.byte 0 # DW_AT_decl_file
|
||||
.byte 4 # DW_AT_decl_line
|
||||
.long 37 # DW_AT_type
|
||||
.byte 0 # End Of Children Mark
|
||||
.byte 0 # End Of Children Mark
|
||||
.Ldebug_info_dwo_end0:
|
||||
.section .debug_abbrev.dwo,"e",@progbits
|
||||
.byte 1 # Abbreviation Code
|
||||
.byte 17 # DW_TAG_compile_unit
|
||||
.byte 1 # DW_CHILDREN_yes
|
||||
.byte 37 # DW_AT_producer
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 19 # DW_AT_language
|
||||
.byte 5 # DW_FORM_data2
|
||||
.byte 3 # DW_AT_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 118 # DW_AT_dwo_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 2 # Abbreviation Code
|
||||
.byte 52 # DW_TAG_variable
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 3 # DW_AT_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 73 # DW_AT_type
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.byte 63 # DW_AT_external
|
||||
.byte 25 # DW_FORM_flag_present
|
||||
.byte 58 # DW_AT_decl_file
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 59 # DW_AT_decl_line
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 24 # DW_FORM_exprloc
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 3 # Abbreviation Code
|
||||
.byte 36 # DW_TAG_base_type
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 3 # DW_AT_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 62 # DW_AT_encoding
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 11 # DW_AT_byte_size
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 4 # Abbreviation Code
|
||||
.byte 46 # DW_TAG_subprogram
|
||||
.byte 1 # DW_CHILDREN_yes
|
||||
.byte 17 # DW_AT_low_pc
|
||||
.byte 27 # DW_FORM_addrx
|
||||
.byte 18 # DW_AT_high_pc
|
||||
.byte 6 # DW_FORM_data4
|
||||
.byte 64 # DW_AT_frame_base
|
||||
.byte 24 # DW_FORM_exprloc
|
||||
.byte 122 # DW_AT_call_all_calls
|
||||
.byte 25 # DW_FORM_flag_present
|
||||
.byte 110 # DW_AT_linkage_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 3 # DW_AT_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 58 # DW_AT_decl_file
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 59 # DW_AT_decl_line
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 73 # DW_AT_type
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.byte 63 # DW_AT_external
|
||||
.byte 25 # DW_FORM_flag_present
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 5 # Abbreviation Code
|
||||
.byte 5 # DW_TAG_formal_parameter
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 34 # DW_FORM_loclistx
|
||||
.byte 3 # DW_AT_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 58 # DW_AT_decl_file
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 59 # DW_AT_decl_line
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 73 # DW_AT_type
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 6 # Abbreviation Code
|
||||
.byte 5 # DW_TAG_formal_parameter
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 24 # DW_FORM_exprloc
|
||||
.byte 3 # DW_AT_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 58 # DW_AT_decl_file
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 59 # DW_AT_decl_line
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 73 # DW_AT_type
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 0 # EOM(3)
|
||||
.section .debug_addr,"",@progbits
|
||||
.long .Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution
|
||||
.Ldebug_addr_start0:
|
||||
.short 5 # DWARF version number
|
||||
.byte 8 # Address size
|
||||
.byte 0 # Segment selector size
|
||||
.Laddr_table_base0:
|
||||
.quad z
|
||||
.quad d
|
||||
.quad .Lfunc_begin0
|
||||
.Ldebug_addr_end0:
|
||||
.ident "clang version 15.0.0"
|
||||
.section ".note.GNU-stack","",@progbits
|
||||
.section .debug_line,"",@progbits
|
||||
.Lline_table_start0:
|
||||
@@ -1,99 +0,0 @@
|
||||
; ModuleID = 'main.cpp'
|
||||
source_filename = "main.cpp"
|
||||
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
|
||||
target triple = "x86_64-unknown-linux-gnu"
|
||||
|
||||
@x = dso_local local_unnamed_addr global i32 0, align 4, !dbg !0
|
||||
@y = dso_local local_unnamed_addr global i32 1, align 4, !dbg !5
|
||||
|
||||
; Function Attrs: argmemonly mustprogress nofree norecurse nosync nounwind willreturn uwtable
|
||||
define dso_local void @_Z3usePiS_(i32* nocapture noundef %x, i32* nocapture noundef %y) local_unnamed_addr #0 !dbg !13 {
|
||||
entry:
|
||||
call void @llvm.dbg.value(metadata i32* %x, metadata !18, metadata !DIExpression()), !dbg !20
|
||||
call void @llvm.dbg.value(metadata i32* %y, metadata !19, metadata !DIExpression()), !dbg !20
|
||||
%0 = load i32, i32* %x, align 4, !dbg !21, !tbaa !22
|
||||
%add = add nsw i32 %0, 4, !dbg !21
|
||||
store i32 %add, i32* %x, align 4, !dbg !21, !tbaa !22
|
||||
%1 = load i32, i32* %y, align 4, !dbg !26, !tbaa !22
|
||||
%sub = add nsw i32 %1, -2, !dbg !26
|
||||
store i32 %sub, i32* %y, align 4, !dbg !26, !tbaa !22
|
||||
ret void, !dbg !27
|
||||
}
|
||||
|
||||
; Function Attrs: mustprogress norecurse uwtable
|
||||
define dso_local noundef i32 @main(i32 noundef %argc, i8** nocapture noundef readnone %argv) local_unnamed_addr #1 !dbg !28 {
|
||||
entry:
|
||||
call void @llvm.dbg.value(metadata i32 %argc, metadata !35, metadata !DIExpression()), !dbg !37
|
||||
call void @llvm.dbg.value(metadata i8** %argv, metadata !36, metadata !DIExpression()), !dbg !37
|
||||
call void @llvm.dbg.value(metadata i32* @x, metadata !18, metadata !DIExpression()), !dbg !38
|
||||
call void @llvm.dbg.value(metadata i32* @y, metadata !19, metadata !DIExpression()), !dbg !38
|
||||
%add.i = add nsw i32 %argc, 4, !dbg !40
|
||||
store i32 %add.i, i32* @x, align 4, !dbg !40, !tbaa !22
|
||||
%sub.i = add nsw i32 %argc, 1, !dbg !41
|
||||
store i32 %sub.i, i32* @y, align 4, !dbg !41, !tbaa !22
|
||||
%call = tail call noundef i32 @_Z6helperii(i32 noundef %add.i, i32 noundef %sub.i), !dbg !42
|
||||
ret i32 %call, !dbg !43
|
||||
}
|
||||
|
||||
declare !dbg !44 dso_local noundef i32 @_Z6helperii(i32 noundef, i32 noundef) local_unnamed_addr #2
|
||||
|
||||
; Function Attrs: nocallback nofree nosync nounwind readnone speculatable willreturn
|
||||
declare void @llvm.dbg.value(metadata, metadata, metadata) #3
|
||||
|
||||
attributes #0 = { argmemonly mustprogress nofree norecurse nosync nounwind willreturn uwtable "frame-pointer"="none" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
|
||||
attributes #1 = { mustprogress norecurse uwtable "frame-pointer"="none" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
|
||||
attributes #2 = { "frame-pointer"="none" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
|
||||
attributes #3 = { nocallback nofree nosync nounwind readnone speculatable willreturn }
|
||||
|
||||
!llvm.dbg.cu = !{!2}
|
||||
!llvm.module.flags = !{!8, !9, !10, !11}
|
||||
!llvm.ident = !{!12}
|
||||
|
||||
!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
|
||||
!1 = distinct !DIGlobalVariable(name: "x", scope: !2, file: !3, line: 7, type: !7, isLocal: false, isDefinition: true)
|
||||
!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !3, producer: "clang version 15.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, globals: !4, splitDebugInlining: false, nameTableKind: None)
|
||||
!3 = !DIFile(filename: "main.cpp", directory: ".", checksumkind: CSK_MD5, checksum: "1f627913a0daee879e00a3a51726f0ef")
|
||||
!4 = !{!0, !5}
|
||||
!5 = !DIGlobalVariableExpression(var: !6, expr: !DIExpression())
|
||||
!6 = distinct !DIGlobalVariable(name: "y", scope: !2, file: !3, line: 8, type: !7, isLocal: false, isDefinition: true)
|
||||
!7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
|
||||
!8 = !{i32 7, !"Dwarf Version", i32 5}
|
||||
!9 = !{i32 2, !"Debug Info Version", i32 3}
|
||||
!10 = !{i32 1, !"wchar_size", i32 4}
|
||||
!11 = !{i32 7, !"uwtable", i32 2}
|
||||
!12 = !{!"clang version 15.0.0"}
|
||||
!13 = distinct !DISubprogram(name: "use", linkageName: "_Z3usePiS_", scope: !3, file: !3, line: 1, type: !14, scopeLine: 1, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !2, retainedNodes: !17)
|
||||
!14 = !DISubroutineType(types: !15)
|
||||
!15 = !{null, !16, !16}
|
||||
!16 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !7, size: 64)
|
||||
!17 = !{!18, !19}
|
||||
!18 = !DILocalVariable(name: "x", arg: 1, scope: !13, file: !3, line: 1, type: !16)
|
||||
!19 = !DILocalVariable(name: "y", arg: 2, scope: !13, file: !3, line: 1, type: !16)
|
||||
!20 = !DILocation(line: 0, scope: !13)
|
||||
!21 = !DILocation(line: 2, column: 4, scope: !13)
|
||||
!22 = !{!23, !23, i64 0}
|
||||
!23 = !{!"int", !24, i64 0}
|
||||
!24 = !{!"omnipotent char", !25, i64 0}
|
||||
!25 = !{!"Simple C++ TBAA"}
|
||||
!26 = !DILocation(line: 3, column: 4, scope: !13)
|
||||
!27 = !DILocation(line: 4, column: 1, scope: !13)
|
||||
!28 = distinct !DISubprogram(name: "main", scope: !3, file: !3, line: 9, type: !29, scopeLine: 9, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !2, retainedNodes: !34)
|
||||
!29 = !DISubroutineType(types: !30)
|
||||
!30 = !{!7, !7, !31}
|
||||
!31 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !32, size: 64)
|
||||
!32 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !33, size: 64)
|
||||
!33 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char)
|
||||
!34 = !{!35, !36}
|
||||
!35 = !DILocalVariable(name: "argc", arg: 1, scope: !28, file: !3, line: 9, type: !7)
|
||||
!36 = !DILocalVariable(name: "argv", arg: 2, scope: !28, file: !3, line: 9, type: !31)
|
||||
!37 = !DILocation(line: 0, scope: !28)
|
||||
!38 = !DILocation(line: 0, scope: !13, inlinedAt: !39)
|
||||
!39 = distinct !DILocation(line: 12, column: 4, scope: !28)
|
||||
!40 = !DILocation(line: 2, column: 4, scope: !13, inlinedAt: !39)
|
||||
!41 = !DILocation(line: 3, column: 4, scope: !13, inlinedAt: !39)
|
||||
!42 = !DILocation(line: 13, column: 11, scope: !28)
|
||||
!43 = !DILocation(line: 13, column: 4, scope: !28)
|
||||
!44 = !DISubprogram(name: "helper", linkageName: "_Z6helperii", scope: !3, file: !3, line: 6, type: !45, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized, retainedNodes: !47)
|
||||
!45 = !DISubroutineType(types: !46)
|
||||
!46 = !{!7, !7, !7}
|
||||
!47 = !{}
|
||||
578
bolt/test/X86/Inputs/dwarf5-df-dualcu-loclist-main.s
Normal file
578
bolt/test/X86/Inputs/dwarf5-df-dualcu-loclist-main.s
Normal file
@@ -0,0 +1,578 @@
|
||||
# clang++ -g -gdwarf-5 -emit-llvm -S main.cpp
|
||||
# llc -O2 -mtriple=x86_64-unknown-linux-gnu main.ll
|
||||
# void use(int * x, int * y) {
|
||||
# *x += 4;
|
||||
# *y -= 2;
|
||||
# }
|
||||
#
|
||||
# int helper(int z_, int d_);
|
||||
# int x = 0;
|
||||
# int y = 1;
|
||||
# int main(int argc, char *argv[]) {
|
||||
# x = argc;
|
||||
# y = argc + 3;
|
||||
# use(&x, &y);
|
||||
# return helper(x, y);
|
||||
# }
|
||||
|
||||
.text
|
||||
.file "main.cpp"
|
||||
.file 0 "." "main.cpp" md5 0x1f627913a0daee879e00a3a51726f0ef
|
||||
.globl _Z3usePiS_ # -- Begin function _Z3usePiS_
|
||||
.p2align 4, 0x90
|
||||
.type _Z3usePiS_,@function
|
||||
_Z3usePiS_: # @_Z3usePiS_
|
||||
.Lfunc_begin0:
|
||||
.loc 0 1 0 # main.cpp:1:0
|
||||
.cfi_startproc
|
||||
# %bb.0: # %entry
|
||||
#DEBUG_VALUE: use:x <- $rdi
|
||||
#DEBUG_VALUE: use:y <- $rsi
|
||||
.loc 0 2 4 prologue_end # main.cpp:2:4
|
||||
addl $4, (%rdi)
|
||||
.loc 0 3 4 # main.cpp:3:4
|
||||
addl $-2, (%rsi)
|
||||
.loc 0 4 1 # main.cpp:4:1
|
||||
retq
|
||||
.Ltmp0:
|
||||
.Lfunc_end0:
|
||||
.size _Z3usePiS_, .Lfunc_end0-_Z3usePiS_
|
||||
.cfi_endproc
|
||||
# -- End function
|
||||
.globl main # -- Begin function main
|
||||
.p2align 4, 0x90
|
||||
.type main,@function
|
||||
main: # @main
|
||||
.Lfunc_begin1:
|
||||
.loc 0 9 0 # main.cpp:9:0
|
||||
.cfi_startproc
|
||||
# %bb.0: # %entry
|
||||
#DEBUG_VALUE: main:argc <- $edi
|
||||
#DEBUG_VALUE: main:argv <- $rsi
|
||||
# kill: def $edi killed $edi def $rdi
|
||||
.loc 0 2 4 prologue_end # main.cpp:2:4
|
||||
leal 4(%rdi), %eax
|
||||
movl %eax, x(%rip)
|
||||
.Ltmp1:
|
||||
#DEBUG_VALUE: use:x <- undef
|
||||
.loc 0 3 4 # main.cpp:3:4
|
||||
leal 1(%rdi), %esi
|
||||
.Ltmp2:
|
||||
#DEBUG_VALUE: main:argv <- [DW_OP_LLVM_entry_value 1] $rsi
|
||||
movl %esi, y(%rip)
|
||||
.Ltmp3:
|
||||
#DEBUG_VALUE: use:y <- undef
|
||||
.loc 0 13 11 # main.cpp:13:11
|
||||
movl %eax, %edi
|
||||
.Ltmp4:
|
||||
#DEBUG_VALUE: main:argc <- [DW_OP_LLVM_entry_value 1] $edi
|
||||
jmp _Z6helperii # TAILCALL
|
||||
.Ltmp5:
|
||||
.Lfunc_end1:
|
||||
.size main, .Lfunc_end1-main
|
||||
.cfi_endproc
|
||||
# -- End function
|
||||
.type x,@object # @x
|
||||
.bss
|
||||
.globl x
|
||||
.p2align 2
|
||||
x:
|
||||
.long 0 # 0x0
|
||||
.size x, 4
|
||||
|
||||
.type y,@object # @y
|
||||
.data
|
||||
.globl y
|
||||
.p2align 2
|
||||
y:
|
||||
.long 1 # 0x1
|
||||
.size y, 4
|
||||
|
||||
.section .debug_loclists.dwo,"e",@progbits
|
||||
.long .Ldebug_list_header_end0-.Ldebug_list_header_start0 # Length
|
||||
.Ldebug_list_header_start0:
|
||||
.short 5 # Version
|
||||
.byte 8 # Address size
|
||||
.byte 0 # Segment selector size
|
||||
.long 2 # Offset entry count
|
||||
.Lloclists_table_base0:
|
||||
.long .Ldebug_loc0-.Lloclists_table_base0
|
||||
.long .Ldebug_loc1-.Lloclists_table_base0
|
||||
.Ldebug_loc0:
|
||||
.byte 1 # DW_LLE_base_addressx
|
||||
.byte 2 # base address index
|
||||
.byte 4 # DW_LLE_offset_pair
|
||||
.uleb128 .Lfunc_begin1-.Lfunc_begin0 # starting offset
|
||||
.uleb128 .Ltmp4-.Lfunc_begin0 # ending offset
|
||||
.byte 1 # Loc expr size
|
||||
.byte 85 # super-register DW_OP_reg5
|
||||
.byte 4 # DW_LLE_offset_pair
|
||||
.uleb128 .Ltmp4-.Lfunc_begin0 # starting offset
|
||||
.uleb128 .Lfunc_end1-.Lfunc_begin0 # ending offset
|
||||
.byte 4 # Loc expr size
|
||||
.byte 163 # DW_OP_entry_value
|
||||
.byte 1 # 1
|
||||
.byte 85 # super-register DW_OP_reg5
|
||||
.byte 159 # DW_OP_stack_value
|
||||
.byte 0 # DW_LLE_end_of_list
|
||||
.Ldebug_loc1:
|
||||
.byte 1 # DW_LLE_base_addressx
|
||||
.byte 2 # base address index
|
||||
.byte 4 # DW_LLE_offset_pair
|
||||
.uleb128 .Lfunc_begin1-.Lfunc_begin0 # starting offset
|
||||
.uleb128 .Ltmp2-.Lfunc_begin0 # ending offset
|
||||
.byte 1 # Loc expr size
|
||||
.byte 84 # DW_OP_reg4
|
||||
.byte 4 # DW_LLE_offset_pair
|
||||
.uleb128 .Ltmp2-.Lfunc_begin0 # starting offset
|
||||
.uleb128 .Lfunc_end1-.Lfunc_begin0 # ending offset
|
||||
.byte 4 # Loc expr size
|
||||
.byte 163 # DW_OP_entry_value
|
||||
.byte 1 # 1
|
||||
.byte 84 # DW_OP_reg4
|
||||
.byte 159 # DW_OP_stack_value
|
||||
.byte 0 # DW_LLE_end_of_list
|
||||
.Ldebug_list_header_end0:
|
||||
.section .debug_abbrev,"",@progbits
|
||||
.byte 1 # Abbreviation Code
|
||||
.byte 74 # DW_TAG_skeleton_unit
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 16 # DW_AT_stmt_list
|
||||
.byte 23 # DW_FORM_sec_offset
|
||||
.byte 114 # DW_AT_str_offsets_base
|
||||
.byte 23 # DW_FORM_sec_offset
|
||||
.byte 27 # DW_AT_comp_dir
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 118 # DW_AT_dwo_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 17 # DW_AT_low_pc
|
||||
.byte 27 # DW_FORM_addrx
|
||||
.byte 18 # DW_AT_high_pc
|
||||
.byte 6 # DW_FORM_data4
|
||||
.byte 115 # DW_AT_addr_base
|
||||
.byte 23 # DW_FORM_sec_offset
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 0 # EOM(3)
|
||||
.section .debug_info,"",@progbits
|
||||
.Lcu_begin0:
|
||||
.long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
|
||||
.Ldebug_info_start0:
|
||||
.short 5 # DWARF version number
|
||||
.byte 4 # DWARF Unit Type
|
||||
.byte 8 # Address Size (in bytes)
|
||||
.long .debug_abbrev # Offset Into Abbrev. Section
|
||||
.quad 4593992475441569756
|
||||
.byte 1 # Abbrev [1] 0x14:0x14 DW_TAG_skeleton_unit
|
||||
.long .Lline_table_start0 # DW_AT_stmt_list
|
||||
.long .Lstr_offsets_base0 # DW_AT_str_offsets_base
|
||||
.byte 0 # DW_AT_comp_dir
|
||||
.byte 1 # DW_AT_dwo_name
|
||||
.byte 2 # DW_AT_low_pc
|
||||
.long .Lfunc_end1-.Lfunc_begin0 # DW_AT_high_pc
|
||||
.long .Laddr_table_base0 # DW_AT_addr_base
|
||||
.Ldebug_info_end0:
|
||||
.section .debug_str_offsets,"",@progbits
|
||||
.long 12 # Length of String Offsets Set
|
||||
.short 5
|
||||
.short 0
|
||||
.Lstr_offsets_base0:
|
||||
.section .debug_str,"MS",@progbits,1
|
||||
.Lskel_string0:
|
||||
.asciz "." # string offset=0
|
||||
.Lskel_string1:
|
||||
.asciz "main.dwo" # string offset=2
|
||||
.section .debug_str_offsets,"",@progbits
|
||||
.long .Lskel_string0
|
||||
.long .Lskel_string1
|
||||
.section .debug_str_offsets.dwo,"e",@progbits
|
||||
.long 60 # Length of String Offsets Set
|
||||
.short 5
|
||||
.short 0
|
||||
.section .debug_str.dwo,"eMS",@progbits,1
|
||||
.Linfo_string0:
|
||||
.asciz "x" # string offset=0
|
||||
.Linfo_string1:
|
||||
.asciz "int" # string offset=2
|
||||
.Linfo_string2:
|
||||
.asciz "y" # string offset=6
|
||||
.Linfo_string3:
|
||||
.asciz "_Z3usePiS_" # string offset=8
|
||||
.Linfo_string4:
|
||||
.asciz "use" # string offset=19
|
||||
.Linfo_string5:
|
||||
.asciz "_Z6helperii" # string offset=23
|
||||
.Linfo_string6:
|
||||
.asciz "helper" # string offset=35
|
||||
.Linfo_string7:
|
||||
.asciz "main" # string offset=42
|
||||
.Linfo_string8:
|
||||
.asciz "argc" # string offset=47
|
||||
.Linfo_string9:
|
||||
.asciz "argv" # string offset=52
|
||||
.Linfo_string10:
|
||||
.asciz "char" # string offset=57
|
||||
.Linfo_string11:
|
||||
.asciz "clang version 15.0.0" # string offset=62
|
||||
.Linfo_string12:
|
||||
.asciz "main.cpp" # string offset=83
|
||||
.Linfo_string13:
|
||||
.asciz "main.dwo" # string offset=92
|
||||
.section .debug_str_offsets.dwo,"e",@progbits
|
||||
.long 0
|
||||
.long 2
|
||||
.long 6
|
||||
.long 8
|
||||
.long 19
|
||||
.long 23
|
||||
.long 35
|
||||
.long 42
|
||||
.long 47
|
||||
.long 52
|
||||
.long 57
|
||||
.long 62
|
||||
.long 83
|
||||
.long 92
|
||||
.section .debug_info.dwo,"e",@progbits
|
||||
.long .Ldebug_info_dwo_end0-.Ldebug_info_dwo_start0 # Length of Unit
|
||||
.Ldebug_info_dwo_start0:
|
||||
.short 5 # DWARF version number
|
||||
.byte 5 # DWARF Unit Type
|
||||
.byte 8 # Address Size (in bytes)
|
||||
.long 0 # Offset Into Abbrev. Section
|
||||
.quad 4593992475441569756
|
||||
.byte 1 # Abbrev [1] 0x14:0xae DW_TAG_compile_unit
|
||||
.byte 11 # DW_AT_producer
|
||||
.short 33 # DW_AT_language
|
||||
.byte 12 # DW_AT_name
|
||||
.byte 13 # DW_AT_dwo_name
|
||||
.byte 2 # Abbrev [2] 0x1a:0xb DW_TAG_variable
|
||||
.byte 0 # DW_AT_name
|
||||
.long 37 # DW_AT_type
|
||||
# DW_AT_external
|
||||
.byte 0 # DW_AT_decl_file
|
||||
.byte 7 # DW_AT_decl_line
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 161
|
||||
.byte 0
|
||||
.byte 3 # Abbrev [3] 0x25:0x4 DW_TAG_base_type
|
||||
.byte 1 # DW_AT_name
|
||||
.byte 5 # DW_AT_encoding
|
||||
.byte 4 # DW_AT_byte_size
|
||||
.byte 2 # Abbrev [2] 0x29:0xb DW_TAG_variable
|
||||
.byte 2 # DW_AT_name
|
||||
.long 37 # DW_AT_type
|
||||
# DW_AT_external
|
||||
.byte 0 # DW_AT_decl_file
|
||||
.byte 8 # DW_AT_decl_line
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 161
|
||||
.byte 1
|
||||
.byte 4 # Abbrev [4] 0x34:0x1b DW_TAG_subprogram
|
||||
.byte 2 # DW_AT_low_pc
|
||||
.long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
|
||||
.byte 1 # DW_AT_frame_base
|
||||
.byte 87
|
||||
# DW_AT_call_all_calls
|
||||
.long 79 # DW_AT_abstract_origin
|
||||
.byte 5 # Abbrev [5] 0x40:0x7 DW_TAG_formal_parameter
|
||||
.byte 1 # DW_AT_location
|
||||
.byte 85
|
||||
.long 84 # DW_AT_abstract_origin
|
||||
.byte 5 # Abbrev [5] 0x47:0x7 DW_TAG_formal_parameter
|
||||
.byte 1 # DW_AT_location
|
||||
.byte 84
|
||||
.long 92 # DW_AT_abstract_origin
|
||||
.byte 0 # End Of Children Mark
|
||||
.byte 6 # Abbrev [6] 0x4f:0x16 DW_TAG_subprogram
|
||||
.byte 3 # DW_AT_linkage_name
|
||||
.byte 4 # DW_AT_name
|
||||
.byte 0 # DW_AT_decl_file
|
||||
.byte 1 # DW_AT_decl_line
|
||||
# DW_AT_external
|
||||
# DW_AT_inline
|
||||
.byte 7 # Abbrev [7] 0x54:0x8 DW_TAG_formal_parameter
|
||||
.byte 0 # DW_AT_name
|
||||
.byte 0 # DW_AT_decl_file
|
||||
.byte 1 # DW_AT_decl_line
|
||||
.long 101 # DW_AT_type
|
||||
.byte 7 # Abbrev [7] 0x5c:0x8 DW_TAG_formal_parameter
|
||||
.byte 2 # DW_AT_name
|
||||
.byte 0 # DW_AT_decl_file
|
||||
.byte 1 # DW_AT_decl_line
|
||||
.long 101 # DW_AT_type
|
||||
.byte 0 # End Of Children Mark
|
||||
.byte 8 # Abbrev [8] 0x65:0x5 DW_TAG_pointer_type
|
||||
.long 37 # DW_AT_type
|
||||
.byte 9 # Abbrev [9] 0x6a:0x35 DW_TAG_subprogram
|
||||
.byte 3 # DW_AT_low_pc
|
||||
.long .Lfunc_end1-.Lfunc_begin1 # DW_AT_high_pc
|
||||
.byte 1 # DW_AT_frame_base
|
||||
.byte 87
|
||||
# DW_AT_call_all_calls
|
||||
.byte 7 # DW_AT_name
|
||||
.byte 0 # DW_AT_decl_file
|
||||
.byte 9 # DW_AT_decl_line
|
||||
.long 37 # DW_AT_type
|
||||
# DW_AT_external
|
||||
.byte 10 # Abbrev [10] 0x79:0x9 DW_TAG_formal_parameter
|
||||
.byte 0 # DW_AT_location
|
||||
.byte 8 # DW_AT_name
|
||||
.byte 0 # DW_AT_decl_file
|
||||
.byte 9 # DW_AT_decl_line
|
||||
.long 37 # DW_AT_type
|
||||
.byte 10 # Abbrev [10] 0x82:0x9 DW_TAG_formal_parameter
|
||||
.byte 1 # DW_AT_location
|
||||
.byte 9 # DW_AT_name
|
||||
.byte 0 # DW_AT_decl_file
|
||||
.byte 9 # DW_AT_decl_line
|
||||
.long 179 # DW_AT_type
|
||||
.byte 11 # Abbrev [11] 0x8b:0xd DW_TAG_inlined_subroutine
|
||||
.long 79 # DW_AT_abstract_origin
|
||||
.byte 3 # DW_AT_low_pc
|
||||
.long .Ltmp3-.Lfunc_begin1 # DW_AT_high_pc
|
||||
.byte 0 # DW_AT_call_file
|
||||
.byte 12 # DW_AT_call_line
|
||||
.byte 4 # DW_AT_call_column
|
||||
.byte 12 # Abbrev [12] 0x98:0x6 DW_TAG_call_site
|
||||
.long 159 # DW_AT_call_origin
|
||||
# DW_AT_call_tail_call
|
||||
.byte 4 # DW_AT_call_pc
|
||||
.byte 0 # End Of Children Mark
|
||||
.byte 13 # Abbrev [13] 0x9f:0x14 DW_TAG_subprogram
|
||||
.byte 5 # DW_AT_linkage_name
|
||||
.byte 6 # DW_AT_name
|
||||
.byte 0 # DW_AT_decl_file
|
||||
.byte 6 # DW_AT_decl_line
|
||||
.long 37 # DW_AT_type
|
||||
# DW_AT_declaration
|
||||
# DW_AT_external
|
||||
.byte 14 # Abbrev [14] 0xa8:0x5 DW_TAG_formal_parameter
|
||||
.long 37 # DW_AT_type
|
||||
.byte 14 # Abbrev [14] 0xad:0x5 DW_TAG_formal_parameter
|
||||
.long 37 # DW_AT_type
|
||||
.byte 0 # End Of Children Mark
|
||||
.byte 8 # Abbrev [8] 0xb3:0x5 DW_TAG_pointer_type
|
||||
.long 184 # DW_AT_type
|
||||
.byte 8 # Abbrev [8] 0xb8:0x5 DW_TAG_pointer_type
|
||||
.long 189 # DW_AT_type
|
||||
.byte 3 # Abbrev [3] 0xbd:0x4 DW_TAG_base_type
|
||||
.byte 10 # DW_AT_name
|
||||
.byte 6 # DW_AT_encoding
|
||||
.byte 1 # DW_AT_byte_size
|
||||
.byte 0 # End Of Children Mark
|
||||
.Ldebug_info_dwo_end0:
|
||||
.section .debug_abbrev.dwo,"e",@progbits
|
||||
.byte 1 # Abbreviation Code
|
||||
.byte 17 # DW_TAG_compile_unit
|
||||
.byte 1 # DW_CHILDREN_yes
|
||||
.byte 37 # DW_AT_producer
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 19 # DW_AT_language
|
||||
.byte 5 # DW_FORM_data2
|
||||
.byte 3 # DW_AT_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 118 # DW_AT_dwo_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 2 # Abbreviation Code
|
||||
.byte 52 # DW_TAG_variable
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 3 # DW_AT_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 73 # DW_AT_type
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.byte 63 # DW_AT_external
|
||||
.byte 25 # DW_FORM_flag_present
|
||||
.byte 58 # DW_AT_decl_file
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 59 # DW_AT_decl_line
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 24 # DW_FORM_exprloc
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 3 # Abbreviation Code
|
||||
.byte 36 # DW_TAG_base_type
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 3 # DW_AT_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 62 # DW_AT_encoding
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 11 # DW_AT_byte_size
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 4 # Abbreviation Code
|
||||
.byte 46 # DW_TAG_subprogram
|
||||
.byte 1 # DW_CHILDREN_yes
|
||||
.byte 17 # DW_AT_low_pc
|
||||
.byte 27 # DW_FORM_addrx
|
||||
.byte 18 # DW_AT_high_pc
|
||||
.byte 6 # DW_FORM_data4
|
||||
.byte 64 # DW_AT_frame_base
|
||||
.byte 24 # DW_FORM_exprloc
|
||||
.byte 122 # DW_AT_call_all_calls
|
||||
.byte 25 # DW_FORM_flag_present
|
||||
.byte 49 # DW_AT_abstract_origin
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 5 # Abbreviation Code
|
||||
.byte 5 # DW_TAG_formal_parameter
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 24 # DW_FORM_exprloc
|
||||
.byte 49 # DW_AT_abstract_origin
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 6 # Abbreviation Code
|
||||
.byte 46 # DW_TAG_subprogram
|
||||
.byte 1 # DW_CHILDREN_yes
|
||||
.byte 110 # DW_AT_linkage_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 3 # DW_AT_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 58 # DW_AT_decl_file
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 59 # DW_AT_decl_line
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 63 # DW_AT_external
|
||||
.byte 25 # DW_FORM_flag_present
|
||||
.byte 32 # DW_AT_inline
|
||||
.byte 33 # DW_FORM_implicit_const
|
||||
.byte 1
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 7 # Abbreviation Code
|
||||
.byte 5 # DW_TAG_formal_parameter
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 3 # DW_AT_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 58 # DW_AT_decl_file
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 59 # DW_AT_decl_line
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 73 # DW_AT_type
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 8 # Abbreviation Code
|
||||
.byte 15 # DW_TAG_pointer_type
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 73 # DW_AT_type
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 9 # Abbreviation Code
|
||||
.byte 46 # DW_TAG_subprogram
|
||||
.byte 1 # DW_CHILDREN_yes
|
||||
.byte 17 # DW_AT_low_pc
|
||||
.byte 27 # DW_FORM_addrx
|
||||
.byte 18 # DW_AT_high_pc
|
||||
.byte 6 # DW_FORM_data4
|
||||
.byte 64 # DW_AT_frame_base
|
||||
.byte 24 # DW_FORM_exprloc
|
||||
.byte 122 # DW_AT_call_all_calls
|
||||
.byte 25 # DW_FORM_flag_present
|
||||
.byte 3 # DW_AT_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 58 # DW_AT_decl_file
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 59 # DW_AT_decl_line
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 73 # DW_AT_type
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.byte 63 # DW_AT_external
|
||||
.byte 25 # DW_FORM_flag_present
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 10 # Abbreviation Code
|
||||
.byte 5 # DW_TAG_formal_parameter
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 34 # DW_FORM_loclistx
|
||||
.byte 3 # DW_AT_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 58 # DW_AT_decl_file
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 59 # DW_AT_decl_line
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 73 # DW_AT_type
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 11 # Abbreviation Code
|
||||
.byte 29 # DW_TAG_inlined_subroutine
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 49 # DW_AT_abstract_origin
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.byte 17 # DW_AT_low_pc
|
||||
.byte 27 # DW_FORM_addrx
|
||||
.byte 18 # DW_AT_high_pc
|
||||
.byte 6 # DW_FORM_data4
|
||||
.byte 88 # DW_AT_call_file
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 89 # DW_AT_call_line
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 87 # DW_AT_call_column
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 12 # Abbreviation Code
|
||||
.byte 72 # DW_TAG_call_site
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 127 # DW_AT_call_origin
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.ascii "\202\001" # DW_AT_call_tail_call
|
||||
.byte 25 # DW_FORM_flag_present
|
||||
.ascii "\201\001" # DW_AT_call_pc
|
||||
.byte 27 # DW_FORM_addrx
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 13 # Abbreviation Code
|
||||
.byte 46 # DW_TAG_subprogram
|
||||
.byte 1 # DW_CHILDREN_yes
|
||||
.byte 110 # DW_AT_linkage_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 3 # DW_AT_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 58 # DW_AT_decl_file
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 59 # DW_AT_decl_line
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 73 # DW_AT_type
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.byte 60 # DW_AT_declaration
|
||||
.byte 25 # DW_FORM_flag_present
|
||||
.byte 63 # DW_AT_external
|
||||
.byte 25 # DW_FORM_flag_present
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 14 # Abbreviation Code
|
||||
.byte 5 # DW_TAG_formal_parameter
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 73 # DW_AT_type
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 0 # EOM(3)
|
||||
.section .debug_addr,"",@progbits
|
||||
.long .Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution
|
||||
.Ldebug_addr_start0:
|
||||
.short 5 # DWARF version number
|
||||
.byte 8 # Address size
|
||||
.byte 0 # Segment selector size
|
||||
.Laddr_table_base0:
|
||||
.quad x
|
||||
.quad y
|
||||
.quad .Lfunc_begin0
|
||||
.quad .Lfunc_begin1
|
||||
.quad .Ltmp4
|
||||
.Ldebug_addr_end0:
|
||||
.ident "clang version 15.0.0"
|
||||
.section ".note.GNU-stack","",@progbits
|
||||
.section .debug_line,"",@progbits
|
||||
.Lline_table_start0:
|
||||
@@ -1,129 +0,0 @@
|
||||
; clang++ -g -gdwarf-5 -emit-llvm -S main.cpp
|
||||
; void use(int * x, int * y) {
|
||||
; *x += 4;
|
||||
; *y -= 2;
|
||||
; }
|
||||
;
|
||||
; int helper(int z_, int d_);
|
||||
; int x = 0;
|
||||
; int y = 1;
|
||||
; int main(int argc, char *argv[]) {
|
||||
; x = argc;
|
||||
; y = argc + 3;
|
||||
; use(&x, &y);
|
||||
; return helper(x, y);
|
||||
; }
|
||||
|
||||
; ModuleID = 'main.cpp'
|
||||
source_filename = "main.cpp"
|
||||
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
|
||||
target triple = "x86_64-unknown-linux-gnu"
|
||||
|
||||
@x = dso_local global i32 0, align 4, !dbg !0
|
||||
@y = dso_local global i32 1, align 4, !dbg !5
|
||||
|
||||
; Function Attrs: mustprogress noinline nounwind optnone uwtable
|
||||
define dso_local void @_Z3usePiS_(i32* noundef %x, i32* noundef %y) #0 !dbg !14 {
|
||||
entry:
|
||||
%x.addr = alloca i32*, align 8
|
||||
%y.addr = alloca i32*, align 8
|
||||
store i32* %x, i32** %x.addr, align 8
|
||||
call void @llvm.dbg.declare(metadata i32** %x.addr, metadata !19, metadata !DIExpression()), !dbg !20
|
||||
store i32* %y, i32** %y.addr, align 8
|
||||
call void @llvm.dbg.declare(metadata i32** %y.addr, metadata !21, metadata !DIExpression()), !dbg !22
|
||||
%0 = load i32*, i32** %x.addr, align 8, !dbg !23
|
||||
%1 = load i32, i32* %0, align 4, !dbg !24
|
||||
%add = add nsw i32 %1, 4, !dbg !24
|
||||
store i32 %add, i32* %0, align 4, !dbg !24
|
||||
%2 = load i32*, i32** %y.addr, align 8, !dbg !25
|
||||
%3 = load i32, i32* %2, align 4, !dbg !26
|
||||
%sub = sub nsw i32 %3, 2, !dbg !26
|
||||
store i32 %sub, i32* %2, align 4, !dbg !26
|
||||
ret void, !dbg !27
|
||||
}
|
||||
|
||||
; Function Attrs: nofree nosync nounwind readnone speculatable willreturn
|
||||
declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
|
||||
|
||||
; Function Attrs: mustprogress noinline norecurse optnone uwtable
|
||||
define dso_local noundef i32 @main(i32 noundef %argc, i8** noundef %argv) #2 !dbg !28 {
|
||||
entry:
|
||||
%retval = alloca i32, align 4
|
||||
%argc.addr = alloca i32, align 4
|
||||
%argv.addr = alloca i8**, align 8
|
||||
store i32 0, i32* %retval, align 4
|
||||
store i32 %argc, i32* %argc.addr, align 4
|
||||
call void @llvm.dbg.declare(metadata i32* %argc.addr, metadata !34, metadata !DIExpression()), !dbg !35
|
||||
store i8** %argv, i8*** %argv.addr, align 8
|
||||
call void @llvm.dbg.declare(metadata i8*** %argv.addr, metadata !36, metadata !DIExpression()), !dbg !37
|
||||
%0 = load i32, i32* %argc.addr, align 4, !dbg !38
|
||||
store i32 %0, i32* @x, align 4, !dbg !39
|
||||
%1 = load i32, i32* %argc.addr, align 4, !dbg !40
|
||||
%add = add nsw i32 %1, 3, !dbg !41
|
||||
store i32 %add, i32* @y, align 4, !dbg !42
|
||||
call void @_Z3usePiS_(i32* noundef @x, i32* noundef @y), !dbg !43
|
||||
%2 = load i32, i32* @x, align 4, !dbg !44
|
||||
%3 = load i32, i32* @y, align 4, !dbg !45
|
||||
%call = call noundef i32 @_Z6helperii(i32 noundef %2, i32 noundef %3), !dbg !46
|
||||
ret i32 %call, !dbg !47
|
||||
}
|
||||
|
||||
declare dso_local noundef i32 @_Z6helperii(i32 noundef, i32 noundef) #3
|
||||
|
||||
attributes #0 = { mustprogress noinline nounwind optnone uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
|
||||
attributes #1 = { nofree nosync nounwind readnone speculatable willreturn }
|
||||
attributes #2 = { mustprogress noinline norecurse optnone uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
|
||||
attributes #3 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
|
||||
|
||||
!llvm.dbg.cu = !{!2}
|
||||
!llvm.module.flags = !{!8, !9, !10, !11, !12}
|
||||
!llvm.ident = !{!13}
|
||||
|
||||
!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
|
||||
!1 = distinct !DIGlobalVariable(name: "x", scope: !2, file: !3, line: 7, type: !7, isLocal: false, isDefinition: true)
|
||||
!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !3, producer: "clang version 15.0.0", isOptimized: false, runtimeVersion: 0, splitDebugFilename: "main.dwo", emissionKind: FullDebug, globals: !4, splitDebugInlining: false, nameTableKind: GNU)
|
||||
!3 = !DIFile(filename: "main.cpp", directory: ".", checksumkind: CSK_MD5, checksum: "1f627913a0daee879e00a3a51726f0ef")
|
||||
!4 = !{!0, !5}
|
||||
!5 = !DIGlobalVariableExpression(var: !6, expr: !DIExpression())
|
||||
!6 = distinct !DIGlobalVariable(name: "y", scope: !2, file: !3, line: 8, type: !7, isLocal: false, isDefinition: true)
|
||||
!7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
|
||||
!8 = !{i32 7, !"Dwarf Version", i32 5}
|
||||
!9 = !{i32 2, !"Debug Info Version", i32 3}
|
||||
!10 = !{i32 1, !"wchar_size", i32 4}
|
||||
!11 = !{i32 7, !"uwtable", i32 2}
|
||||
!12 = !{i32 7, !"frame-pointer", i32 2}
|
||||
!13 = !{!"clang version 15.0.0"}
|
||||
!14 = distinct !DISubprogram(name: "use", linkageName: "_Z3usePiS_", scope: !3, file: !3, line: 1, type: !15, scopeLine: 1, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !18)
|
||||
!15 = !DISubroutineType(types: !16)
|
||||
!16 = !{null, !17, !17}
|
||||
!17 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !7, size: 64)
|
||||
!18 = !{}
|
||||
!19 = !DILocalVariable(name: "x", arg: 1, scope: !14, file: !3, line: 1, type: !17)
|
||||
!20 = !DILocation(line: 1, column: 16, scope: !14)
|
||||
!21 = !DILocalVariable(name: "y", arg: 2, scope: !14, file: !3, line: 1, type: !17)
|
||||
!22 = !DILocation(line: 1, column: 25, scope: !14)
|
||||
!23 = !DILocation(line: 2, column: 2, scope: !14)
|
||||
!24 = !DILocation(line: 2, column: 4, scope: !14)
|
||||
!25 = !DILocation(line: 3, column: 2, scope: !14)
|
||||
!26 = !DILocation(line: 3, column: 4, scope: !14)
|
||||
!27 = !DILocation(line: 4, column: 1, scope: !14)
|
||||
!28 = distinct !DISubprogram(name: "main", scope: !3, file: !3, line: 9, type: !29, scopeLine: 9, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !18)
|
||||
!29 = !DISubroutineType(types: !30)
|
||||
!30 = !{!7, !7, !31}
|
||||
!31 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !32, size: 64)
|
||||
!32 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !33, size: 64)
|
||||
!33 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char)
|
||||
!34 = !DILocalVariable(name: "argc", arg: 1, scope: !28, file: !3, line: 9, type: !7)
|
||||
!35 = !DILocation(line: 9, column: 15, scope: !28)
|
||||
!36 = !DILocalVariable(name: "argv", arg: 2, scope: !28, file: !3, line: 9, type: !31)
|
||||
!37 = !DILocation(line: 9, column: 27, scope: !28)
|
||||
!38 = !DILocation(line: 10, column: 8, scope: !28)
|
||||
!39 = !DILocation(line: 10, column: 6, scope: !28)
|
||||
!40 = !DILocation(line: 11, column: 8, scope: !28)
|
||||
!41 = !DILocation(line: 11, column: 13, scope: !28)
|
||||
!42 = !DILocation(line: 11, column: 6, scope: !28)
|
||||
!43 = !DILocation(line: 12, column: 4, scope: !28)
|
||||
!44 = !DILocation(line: 13, column: 18, scope: !28)
|
||||
!45 = !DILocation(line: 13, column: 21, scope: !28)
|
||||
!46 = !DILocation(line: 13, column: 11, scope: !28)
|
||||
!47 = !DILocation(line: 13, column: 4, scope: !28)
|
||||
476
bolt/test/X86/Inputs/dwarf5-df-dualcu-main.s
Normal file
476
bolt/test/X86/Inputs/dwarf5-df-dualcu-main.s
Normal file
@@ -0,0 +1,476 @@
|
||||
# clang++ -g -gdwarf-5 -emit-llvm -S main.cpp
|
||||
# llc -O0 -mtriple=x86_64-unknown-linux-gnu main.ll
|
||||
# void use(int * x, int * y) {
|
||||
# *x += 4;
|
||||
# *y -= 2;
|
||||
# }
|
||||
#
|
||||
# int helper(int z_, int d_);
|
||||
# int x = 0;
|
||||
# int y = 1;
|
||||
# int main(int argc, char *argv[]) {
|
||||
# x = argc;
|
||||
# y = argc + 3;
|
||||
# use(&x, &y);
|
||||
# return helper(x, y);
|
||||
# }
|
||||
|
||||
.text
|
||||
.file "main.cpp"
|
||||
.file 0 "." "main.cpp" md5 0x1f627913a0daee879e00a3a51726f0ef
|
||||
.globl _Z3usePiS_ # -- Begin function _Z3usePiS_
|
||||
.p2align 4, 0x90
|
||||
.type _Z3usePiS_,@function
|
||||
_Z3usePiS_: # @_Z3usePiS_
|
||||
.Lfunc_begin0:
|
||||
.loc 0 1 0 # main.cpp:1:0
|
||||
.cfi_startproc
|
||||
# %bb.0: # %entry
|
||||
pushq %rbp
|
||||
.cfi_def_cfa_offset 16
|
||||
.cfi_offset %rbp, -16
|
||||
movq %rsp, %rbp
|
||||
.cfi_def_cfa_register %rbp
|
||||
movq %rdi, -8(%rbp)
|
||||
movq %rsi, -16(%rbp)
|
||||
.Ltmp0:
|
||||
.loc 0 2 2 prologue_end # main.cpp:2:2
|
||||
movq -8(%rbp), %rax
|
||||
.loc 0 2 4 is_stmt 0 # main.cpp:2:4
|
||||
movl (%rax), %ecx
|
||||
addl $4, %ecx
|
||||
movl %ecx, (%rax)
|
||||
.loc 0 3 2 is_stmt 1 # main.cpp:3:2
|
||||
movq -16(%rbp), %rax
|
||||
.loc 0 3 4 is_stmt 0 # main.cpp:3:4
|
||||
movl (%rax), %ecx
|
||||
subl $2, %ecx
|
||||
movl %ecx, (%rax)
|
||||
.loc 0 4 1 is_stmt 1 # main.cpp:4:1
|
||||
popq %rbp
|
||||
.cfi_def_cfa %rsp, 8
|
||||
retq
|
||||
.Ltmp1:
|
||||
.Lfunc_end0:
|
||||
.size _Z3usePiS_, .Lfunc_end0-_Z3usePiS_
|
||||
.cfi_endproc
|
||||
# -- End function
|
||||
.globl main # -- Begin function main
|
||||
.p2align 4, 0x90
|
||||
.type main,@function
|
||||
main: # @main
|
||||
.Lfunc_begin1:
|
||||
.loc 0 9 0 # main.cpp:9:0
|
||||
.cfi_startproc
|
||||
# %bb.0: # %entry
|
||||
pushq %rbp
|
||||
.cfi_def_cfa_offset 16
|
||||
.cfi_offset %rbp, -16
|
||||
movq %rsp, %rbp
|
||||
.cfi_def_cfa_register %rbp
|
||||
subq $16, %rsp
|
||||
movl $0, -4(%rbp)
|
||||
movl %edi, -8(%rbp)
|
||||
movq %rsi, -16(%rbp)
|
||||
.Ltmp2:
|
||||
.loc 0 10 8 prologue_end # main.cpp:10:8
|
||||
movl -8(%rbp), %eax
|
||||
.loc 0 10 6 is_stmt 0 # main.cpp:10:6
|
||||
movl %eax, x
|
||||
.loc 0 11 8 is_stmt 1 # main.cpp:11:8
|
||||
movl -8(%rbp), %eax
|
||||
.loc 0 11 13 is_stmt 0 # main.cpp:11:13
|
||||
addl $3, %eax
|
||||
.loc 0 11 6 # main.cpp:11:6
|
||||
movl %eax, y
|
||||
.loc 0 12 4 is_stmt 1 # main.cpp:12:4
|
||||
movabsq $x, %rdi
|
||||
movabsq $y, %rsi
|
||||
callq _Z3usePiS_
|
||||
.loc 0 13 18 # main.cpp:13:18
|
||||
movl x, %edi
|
||||
.loc 0 13 21 is_stmt 0 # main.cpp:13:21
|
||||
movl y, %esi
|
||||
.loc 0 13 11 # main.cpp:13:11
|
||||
callq _Z6helperii
|
||||
.loc 0 13 4 # main.cpp:13:4
|
||||
addq $16, %rsp
|
||||
popq %rbp
|
||||
.cfi_def_cfa %rsp, 8
|
||||
retq
|
||||
.Ltmp3:
|
||||
.Lfunc_end1:
|
||||
.size main, .Lfunc_end1-main
|
||||
.cfi_endproc
|
||||
# -- End function
|
||||
.type x,@object # @x
|
||||
.bss
|
||||
.globl x
|
||||
.p2align 2
|
||||
x:
|
||||
.long 0 # 0x0
|
||||
.size x, 4
|
||||
|
||||
.type y,@object # @y
|
||||
.data
|
||||
.globl y
|
||||
.p2align 2
|
||||
y:
|
||||
.long 1 # 0x1
|
||||
.size y, 4
|
||||
|
||||
.section .debug_abbrev,"",@progbits
|
||||
.byte 1 # Abbreviation Code
|
||||
.byte 74 # DW_TAG_skeleton_unit
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 16 # DW_AT_stmt_list
|
||||
.byte 23 # DW_FORM_sec_offset
|
||||
.byte 114 # DW_AT_str_offsets_base
|
||||
.byte 23 # DW_FORM_sec_offset
|
||||
.byte 27 # DW_AT_comp_dir
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.ascii "\264B" # DW_AT_GNU_pubnames
|
||||
.byte 25 # DW_FORM_flag_present
|
||||
.byte 118 # DW_AT_dwo_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 17 # DW_AT_low_pc
|
||||
.byte 27 # DW_FORM_addrx
|
||||
.byte 18 # DW_AT_high_pc
|
||||
.byte 6 # DW_FORM_data4
|
||||
.byte 115 # DW_AT_addr_base
|
||||
.byte 23 # DW_FORM_sec_offset
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 0 # EOM(3)
|
||||
.section .debug_info,"",@progbits
|
||||
.Lcu_begin0:
|
||||
.long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
|
||||
.Ldebug_info_start0:
|
||||
.short 5 # DWARF version number
|
||||
.byte 4 # DWARF Unit Type
|
||||
.byte 8 # Address Size (in bytes)
|
||||
.long .debug_abbrev # Offset Into Abbrev. Section
|
||||
.quad 2452897014735893912
|
||||
.byte 1 # Abbrev [1] 0x14:0x14 DW_TAG_skeleton_unit
|
||||
.long .Lline_table_start0 # DW_AT_stmt_list
|
||||
.long .Lstr_offsets_base0 # DW_AT_str_offsets_base
|
||||
.byte 0 # DW_AT_comp_dir
|
||||
# DW_AT_GNU_pubnames
|
||||
.byte 1 # DW_AT_dwo_name
|
||||
.byte 2 # DW_AT_low_pc
|
||||
.long .Lfunc_end1-.Lfunc_begin0 # DW_AT_high_pc
|
||||
.long .Laddr_table_base0 # DW_AT_addr_base
|
||||
.Ldebug_info_end0:
|
||||
.section .debug_str_offsets,"",@progbits
|
||||
.long 12 # Length of String Offsets Set
|
||||
.short 5
|
||||
.short 0
|
||||
.Lstr_offsets_base0:
|
||||
.section .debug_str,"MS",@progbits,1
|
||||
.Lskel_string0:
|
||||
.asciz "." # string offset=0
|
||||
.Lskel_string1:
|
||||
.asciz "main.dwo" # string offset=2
|
||||
.section .debug_str_offsets,"",@progbits
|
||||
.long .Lskel_string0
|
||||
.long .Lskel_string1
|
||||
.section .debug_str_offsets.dwo,"e",@progbits
|
||||
.long 52 # Length of String Offsets Set
|
||||
.short 5
|
||||
.short 0
|
||||
.section .debug_str.dwo,"eMS",@progbits,1
|
||||
.Linfo_string0:
|
||||
.asciz "x" # string offset=0
|
||||
.Linfo_string1:
|
||||
.asciz "int" # string offset=2
|
||||
.Linfo_string2:
|
||||
.asciz "y" # string offset=6
|
||||
.Linfo_string3:
|
||||
.asciz "_Z3usePiS_" # string offset=8
|
||||
.Linfo_string4:
|
||||
.asciz "use" # string offset=19
|
||||
.Linfo_string5:
|
||||
.asciz "main" # string offset=23
|
||||
.Linfo_string6:
|
||||
.asciz "argc" # string offset=28
|
||||
.Linfo_string7:
|
||||
.asciz "argv" # string offset=33
|
||||
.Linfo_string8:
|
||||
.asciz "char" # string offset=38
|
||||
.Linfo_string9:
|
||||
.asciz "clang version 15.0.0" # string offset=43
|
||||
.Linfo_string10:
|
||||
.asciz "main.cpp" # string offset=64
|
||||
.Linfo_string11:
|
||||
.asciz "main.dwo" # string offset=73
|
||||
.section .debug_str_offsets.dwo,"e",@progbits
|
||||
.long 0
|
||||
.long 2
|
||||
.long 6
|
||||
.long 8
|
||||
.long 19
|
||||
.long 23
|
||||
.long 28
|
||||
.long 33
|
||||
.long 38
|
||||
.long 43
|
||||
.long 64
|
||||
.long 73
|
||||
.section .debug_info.dwo,"e",@progbits
|
||||
.long .Ldebug_info_dwo_end0-.Ldebug_info_dwo_start0 # Length of Unit
|
||||
.Ldebug_info_dwo_start0:
|
||||
.short 5 # DWARF version number
|
||||
.byte 5 # DWARF Unit Type
|
||||
.byte 8 # Address Size (in bytes)
|
||||
.long 0 # Offset Into Abbrev. Section
|
||||
.quad 2452897014735893912
|
||||
.byte 1 # Abbrev [1] 0x14:0x7d DW_TAG_compile_unit
|
||||
.byte 9 # DW_AT_producer
|
||||
.short 33 # DW_AT_language
|
||||
.byte 10 # DW_AT_name
|
||||
.byte 11 # DW_AT_dwo_name
|
||||
.byte 2 # Abbrev [2] 0x1a:0xb DW_TAG_variable
|
||||
.byte 0 # DW_AT_name
|
||||
.long 37 # DW_AT_type
|
||||
# DW_AT_external
|
||||
.byte 0 # DW_AT_decl_file
|
||||
.byte 7 # DW_AT_decl_line
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 161
|
||||
.byte 0
|
||||
.byte 3 # Abbrev [3] 0x25:0x4 DW_TAG_base_type
|
||||
.byte 1 # DW_AT_name
|
||||
.byte 5 # DW_AT_encoding
|
||||
.byte 4 # DW_AT_byte_size
|
||||
.byte 2 # Abbrev [2] 0x29:0xb DW_TAG_variable
|
||||
.byte 2 # DW_AT_name
|
||||
.long 37 # DW_AT_type
|
||||
# DW_AT_external
|
||||
.byte 0 # DW_AT_decl_file
|
||||
.byte 8 # DW_AT_decl_line
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 161
|
||||
.byte 1
|
||||
.byte 4 # Abbrev [4] 0x34:0x23 DW_TAG_subprogram
|
||||
.byte 2 # DW_AT_low_pc
|
||||
.long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
|
||||
.byte 1 # DW_AT_frame_base
|
||||
.byte 86
|
||||
.byte 3 # DW_AT_linkage_name
|
||||
.byte 4 # DW_AT_name
|
||||
.byte 0 # DW_AT_decl_file
|
||||
.byte 1 # DW_AT_decl_line
|
||||
# DW_AT_external
|
||||
.byte 5 # Abbrev [5] 0x40:0xb DW_TAG_formal_parameter
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 145
|
||||
.byte 120
|
||||
.byte 0 # DW_AT_name
|
||||
.byte 0 # DW_AT_decl_file
|
||||
.byte 1 # DW_AT_decl_line
|
||||
.long 125 # DW_AT_type
|
||||
.byte 5 # Abbrev [5] 0x4b:0xb DW_TAG_formal_parameter
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 145
|
||||
.byte 112
|
||||
.byte 2 # DW_AT_name
|
||||
.byte 0 # DW_AT_decl_file
|
||||
.byte 1 # DW_AT_decl_line
|
||||
.long 125 # DW_AT_type
|
||||
.byte 0 # End Of Children Mark
|
||||
.byte 6 # Abbrev [6] 0x57:0x26 DW_TAG_subprogram
|
||||
.byte 3 # DW_AT_low_pc
|
||||
.long .Lfunc_end1-.Lfunc_begin1 # DW_AT_high_pc
|
||||
.byte 1 # DW_AT_frame_base
|
||||
.byte 86
|
||||
.byte 5 # DW_AT_name
|
||||
.byte 0 # DW_AT_decl_file
|
||||
.byte 9 # DW_AT_decl_line
|
||||
.long 37 # DW_AT_type
|
||||
# DW_AT_external
|
||||
.byte 5 # Abbrev [5] 0x66:0xb DW_TAG_formal_parameter
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 145
|
||||
.byte 120
|
||||
.byte 6 # DW_AT_name
|
||||
.byte 0 # DW_AT_decl_file
|
||||
.byte 9 # DW_AT_decl_line
|
||||
.long 37 # DW_AT_type
|
||||
.byte 5 # Abbrev [5] 0x71:0xb DW_TAG_formal_parameter
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 145
|
||||
.byte 112
|
||||
.byte 7 # DW_AT_name
|
||||
.byte 0 # DW_AT_decl_file
|
||||
.byte 9 # DW_AT_decl_line
|
||||
.long 130 # DW_AT_type
|
||||
.byte 0 # End Of Children Mark
|
||||
.byte 7 # Abbrev [7] 0x7d:0x5 DW_TAG_pointer_type
|
||||
.long 37 # DW_AT_type
|
||||
.byte 7 # Abbrev [7] 0x82:0x5 DW_TAG_pointer_type
|
||||
.long 135 # DW_AT_type
|
||||
.byte 7 # Abbrev [7] 0x87:0x5 DW_TAG_pointer_type
|
||||
.long 140 # DW_AT_type
|
||||
.byte 3 # Abbrev [3] 0x8c:0x4 DW_TAG_base_type
|
||||
.byte 8 # DW_AT_name
|
||||
.byte 6 # DW_AT_encoding
|
||||
.byte 1 # DW_AT_byte_size
|
||||
.byte 0 # End Of Children Mark
|
||||
.Ldebug_info_dwo_end0:
|
||||
.section .debug_abbrev.dwo,"e",@progbits
|
||||
.byte 1 # Abbreviation Code
|
||||
.byte 17 # DW_TAG_compile_unit
|
||||
.byte 1 # DW_CHILDREN_yes
|
||||
.byte 37 # DW_AT_producer
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 19 # DW_AT_language
|
||||
.byte 5 # DW_FORM_data2
|
||||
.byte 3 # DW_AT_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 118 # DW_AT_dwo_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 2 # Abbreviation Code
|
||||
.byte 52 # DW_TAG_variable
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 3 # DW_AT_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 73 # DW_AT_type
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.byte 63 # DW_AT_external
|
||||
.byte 25 # DW_FORM_flag_present
|
||||
.byte 58 # DW_AT_decl_file
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 59 # DW_AT_decl_line
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 24 # DW_FORM_exprloc
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 3 # Abbreviation Code
|
||||
.byte 36 # DW_TAG_base_type
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 3 # DW_AT_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 62 # DW_AT_encoding
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 11 # DW_AT_byte_size
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 4 # Abbreviation Code
|
||||
.byte 46 # DW_TAG_subprogram
|
||||
.byte 1 # DW_CHILDREN_yes
|
||||
.byte 17 # DW_AT_low_pc
|
||||
.byte 27 # DW_FORM_addrx
|
||||
.byte 18 # DW_AT_high_pc
|
||||
.byte 6 # DW_FORM_data4
|
||||
.byte 64 # DW_AT_frame_base
|
||||
.byte 24 # DW_FORM_exprloc
|
||||
.byte 110 # DW_AT_linkage_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 3 # DW_AT_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 58 # DW_AT_decl_file
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 59 # DW_AT_decl_line
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 63 # DW_AT_external
|
||||
.byte 25 # DW_FORM_flag_present
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 5 # Abbreviation Code
|
||||
.byte 5 # DW_TAG_formal_parameter
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 24 # DW_FORM_exprloc
|
||||
.byte 3 # DW_AT_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 58 # DW_AT_decl_file
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 59 # DW_AT_decl_line
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 73 # DW_AT_type
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 6 # Abbreviation Code
|
||||
.byte 46 # DW_TAG_subprogram
|
||||
.byte 1 # DW_CHILDREN_yes
|
||||
.byte 17 # DW_AT_low_pc
|
||||
.byte 27 # DW_FORM_addrx
|
||||
.byte 18 # DW_AT_high_pc
|
||||
.byte 6 # DW_FORM_data4
|
||||
.byte 64 # DW_AT_frame_base
|
||||
.byte 24 # DW_FORM_exprloc
|
||||
.byte 3 # DW_AT_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 58 # DW_AT_decl_file
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 59 # DW_AT_decl_line
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 73 # DW_AT_type
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.byte 63 # DW_AT_external
|
||||
.byte 25 # DW_FORM_flag_present
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 7 # Abbreviation Code
|
||||
.byte 15 # DW_TAG_pointer_type
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 73 # DW_AT_type
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 0 # EOM(3)
|
||||
.section .debug_addr,"",@progbits
|
||||
.long .Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution
|
||||
.Ldebug_addr_start0:
|
||||
.short 5 # DWARF version number
|
||||
.byte 8 # Address size
|
||||
.byte 0 # Segment selector size
|
||||
.Laddr_table_base0:
|
||||
.quad x
|
||||
.quad y
|
||||
.quad .Lfunc_begin0
|
||||
.quad .Lfunc_begin1
|
||||
.Ldebug_addr_end0:
|
||||
.section .debug_gnu_pubnames,"",@progbits
|
||||
.long .LpubNames_end0-.LpubNames_start0 # Length of Public Names Info
|
||||
.LpubNames_start0:
|
||||
.short 2 # DWARF Version
|
||||
.long .Lcu_begin0 # Offset of Compilation Unit Info
|
||||
.long 40 # Compilation Unit Length
|
||||
.long 87 # DIE offset
|
||||
.byte 48 # Attributes: FUNCTION, EXTERNAL
|
||||
.asciz "main" # External Name
|
||||
.long 26 # DIE offset
|
||||
.byte 32 # Attributes: VARIABLE, EXTERNAL
|
||||
.asciz "x" # External Name
|
||||
.long 41 # DIE offset
|
||||
.byte 32 # Attributes: VARIABLE, EXTERNAL
|
||||
.asciz "y" # External Name
|
||||
.long 52 # DIE offset
|
||||
.byte 48 # Attributes: FUNCTION, EXTERNAL
|
||||
.asciz "use" # External Name
|
||||
.long 0 # End Mark
|
||||
.LpubNames_end0:
|
||||
.section .debug_gnu_pubtypes,"",@progbits
|
||||
.long .LpubTypes_end0-.LpubTypes_start0 # Length of Public Types Info
|
||||
.LpubTypes_start0:
|
||||
.short 2 # DWARF Version
|
||||
.long .Lcu_begin0 # Offset of Compilation Unit Info
|
||||
.long 40 # Compilation Unit Length
|
||||
.long 37 # DIE offset
|
||||
.byte 144 # Attributes: TYPE, STATIC
|
||||
.asciz "int" # External Name
|
||||
.long 140 # DIE offset
|
||||
.byte 144 # Attributes: TYPE, STATIC
|
||||
.asciz "char" # External Name
|
||||
.long 0 # End Mark
|
||||
.LpubTypes_end0:
|
||||
.ident "clang version 15.0.0"
|
||||
.section ".note.GNU-stack","",@progbits
|
||||
.section .debug_line,"",@progbits
|
||||
.Lline_table_start0:
|
||||
@@ -1,81 +0,0 @@
|
||||
; clang++ -g -gdwarf-5 -emit-llvm -S helper.cpp
|
||||
; int z = 0;
|
||||
; int d = 0;
|
||||
;
|
||||
; int helper(int z_, int d_) {
|
||||
; z += z_;
|
||||
; d += d_;
|
||||
; return z * d;
|
||||
; }
|
||||
|
||||
; ModuleID = 'helper.cpp'
|
||||
source_filename = "helper.cpp"
|
||||
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
|
||||
target triple = "x86_64-unknown-linux-gnu"
|
||||
|
||||
@z = dso_local global i32 0, align 4, !dbg !0
|
||||
@d = dso_local global i32 0, align 4, !dbg !5
|
||||
|
||||
; Function Attrs: mustprogress noinline nounwind optnone uwtable
|
||||
define dso_local noundef i32 @_Z6helperii(i32 noundef %z_, i32 noundef %d_) #0 !dbg !14 {
|
||||
entry:
|
||||
%z_.addr = alloca i32, align 4
|
||||
%d_.addr = alloca i32, align 4
|
||||
store i32 %z_, i32* %z_.addr, align 4
|
||||
call void @llvm.dbg.declare(metadata i32* %z_.addr, metadata !18, metadata !DIExpression()), !dbg !19
|
||||
store i32 %d_, i32* %d_.addr, align 4
|
||||
call void @llvm.dbg.declare(metadata i32* %d_.addr, metadata !20, metadata !DIExpression()), !dbg !21
|
||||
%0 = load i32, i32* %z_.addr, align 4, !dbg !22
|
||||
%1 = load i32, i32* @z, align 4, !dbg !23
|
||||
%add = add nsw i32 %1, %0, !dbg !23
|
||||
store i32 %add, i32* @z, align 4, !dbg !23
|
||||
%2 = load i32, i32* %d_.addr, align 4, !dbg !24
|
||||
%3 = load i32, i32* @d, align 4, !dbg !25
|
||||
%add1 = add nsw i32 %3, %2, !dbg !25
|
||||
store i32 %add1, i32* @d, align 4, !dbg !25
|
||||
%4 = load i32, i32* @z, align 4, !dbg !26
|
||||
%5 = load i32, i32* @d, align 4, !dbg !27
|
||||
%mul = mul nsw i32 %4, %5, !dbg !28
|
||||
ret i32 %mul, !dbg !29
|
||||
}
|
||||
|
||||
; Function Attrs: nocallback nofree nosync nounwind readnone speculatable willreturn
|
||||
declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
|
||||
|
||||
attributes #0 = { mustprogress noinline nounwind optnone uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
|
||||
attributes #1 = { nocallback nofree nosync nounwind readnone speculatable willreturn }
|
||||
|
||||
!llvm.dbg.cu = !{!2}
|
||||
!llvm.module.flags = !{!8, !9, !10, !11, !12}
|
||||
!llvm.ident = !{!13}
|
||||
|
||||
!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
|
||||
!1 = distinct !DIGlobalVariable(name: "z", scope: !2, file: !3, line: 1, type: !7, isLocal: false, isDefinition: true)
|
||||
!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !3, producer: "clang version 15.0.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, globals: !4, splitDebugInlining: false, nameTableKind: None)
|
||||
!3 = !DIFile(filename: "helper.cpp", directory: ".", checksumkind: CSK_MD5, checksum: "e635924a35b65444173d0c76a54b866f")
|
||||
!4 = !{!0, !5}
|
||||
!5 = !DIGlobalVariableExpression(var: !6, expr: !DIExpression())
|
||||
!6 = distinct !DIGlobalVariable(name: "d", scope: !2, file: !3, line: 2, type: !7, isLocal: false, isDefinition: true)
|
||||
!7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
|
||||
!8 = !{i32 7, !"Dwarf Version", i32 5}
|
||||
!9 = !{i32 2, !"Debug Info Version", i32 3}
|
||||
!10 = !{i32 1, !"wchar_size", i32 4}
|
||||
!11 = !{i32 7, !"uwtable", i32 2}
|
||||
!12 = !{i32 7, !"frame-pointer", i32 2}
|
||||
!13 = !{!"clang version 15.0.0"}
|
||||
!14 = distinct !DISubprogram(name: "helper", linkageName: "_Z6helperii", scope: !3, file: !3, line: 4, type: !15, scopeLine: 4, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !17)
|
||||
!15 = !DISubroutineType(types: !16)
|
||||
!16 = !{!7, !7, !7}
|
||||
!17 = !{}
|
||||
!18 = !DILocalVariable(name: "z_", arg: 1, scope: !14, file: !3, line: 4, type: !7)
|
||||
!19 = !DILocation(line: 4, column: 16, scope: !14)
|
||||
!20 = !DILocalVariable(name: "d_", arg: 2, scope: !14, file: !3, line: 4, type: !7)
|
||||
!21 = !DILocation(line: 4, column: 24, scope: !14)
|
||||
!22 = !DILocation(line: 5, column: 7, scope: !14)
|
||||
!23 = !DILocation(line: 5, column: 4, scope: !14)
|
||||
!24 = !DILocation(line: 6, column: 7, scope: !14)
|
||||
!25 = !DILocation(line: 6, column: 4, scope: !14)
|
||||
!26 = !DILocation(line: 7, column: 9, scope: !14)
|
||||
!27 = !DILocation(line: 7, column: 13, scope: !14)
|
||||
!28 = !DILocation(line: 7, column: 11, scope: !14)
|
||||
!29 = !DILocation(line: 7, column: 2, scope: !14)
|
||||
281
bolt/test/X86/Inputs/dwarf5-df-mono-helper.s
Normal file
281
bolt/test/X86/Inputs/dwarf5-df-mono-helper.s
Normal file
@@ -0,0 +1,281 @@
|
||||
# clang++ -g -gdwarf-5 -emit-llvm -S helper.cpp
|
||||
# llc -O0 -mtriple=x86_64-unknown-linux-gnu helper.ll
|
||||
# int z = 0;
|
||||
# int d = 0;
|
||||
#
|
||||
# int helper(int z_, int d_) {
|
||||
# z += z_;
|
||||
# d += d_;
|
||||
# return z * d;
|
||||
# }
|
||||
|
||||
.text
|
||||
.file "helper.cpp"
|
||||
.file 0 "." "helper.cpp" md5 0xe635924a35b65444173d0c76a54b866f
|
||||
.globl _Z6helperii # -- Begin function _Z6helperii
|
||||
.p2align 4, 0x90
|
||||
.type _Z6helperii,@function
|
||||
_Z6helperii: # @_Z6helperii
|
||||
.Lfunc_begin0:
|
||||
.loc 0 4 0 # helper.cpp:4:0
|
||||
.cfi_startproc
|
||||
# %bb.0: # %entry
|
||||
pushq %rbp
|
||||
.cfi_def_cfa_offset 16
|
||||
.cfi_offset %rbp, -16
|
||||
movq %rsp, %rbp
|
||||
.cfi_def_cfa_register %rbp
|
||||
movl %edi, -4(%rbp)
|
||||
movl %esi, -8(%rbp)
|
||||
.Ltmp0:
|
||||
.loc 0 5 7 prologue_end # helper.cpp:5:7
|
||||
movl -4(%rbp), %eax
|
||||
.loc 0 5 4 is_stmt 0 # helper.cpp:5:4
|
||||
addl z, %eax
|
||||
movl %eax, z
|
||||
.loc 0 6 7 is_stmt 1 # helper.cpp:6:7
|
||||
movl -8(%rbp), %eax
|
||||
.loc 0 6 4 is_stmt 0 # helper.cpp:6:4
|
||||
addl d, %eax
|
||||
movl %eax, d
|
||||
.loc 0 7 9 is_stmt 1 # helper.cpp:7:9
|
||||
movl z, %eax
|
||||
.loc 0 7 11 is_stmt 0 # helper.cpp:7:11
|
||||
imull d, %eax
|
||||
.loc 0 7 2 # helper.cpp:7:2
|
||||
popq %rbp
|
||||
.cfi_def_cfa %rsp, 8
|
||||
retq
|
||||
.Ltmp1:
|
||||
.Lfunc_end0:
|
||||
.size _Z6helperii, .Lfunc_end0-_Z6helperii
|
||||
.cfi_endproc
|
||||
# -- End function
|
||||
.type z,@object # @z
|
||||
.bss
|
||||
.globl z
|
||||
.p2align 2
|
||||
z:
|
||||
.long 0 # 0x0
|
||||
.size z, 4
|
||||
|
||||
.type d,@object # @d
|
||||
.globl d
|
||||
.p2align 2
|
||||
d:
|
||||
.long 0 # 0x0
|
||||
.size d, 4
|
||||
|
||||
.section .debug_abbrev,"",@progbits
|
||||
.byte 1 # Abbreviation Code
|
||||
.byte 17 # DW_TAG_compile_unit
|
||||
.byte 1 # DW_CHILDREN_yes
|
||||
.byte 37 # DW_AT_producer
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 19 # DW_AT_language
|
||||
.byte 5 # DW_FORM_data2
|
||||
.byte 3 # DW_AT_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 114 # DW_AT_str_offsets_base
|
||||
.byte 23 # DW_FORM_sec_offset
|
||||
.byte 16 # DW_AT_stmt_list
|
||||
.byte 23 # DW_FORM_sec_offset
|
||||
.byte 27 # DW_AT_comp_dir
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 17 # DW_AT_low_pc
|
||||
.byte 27 # DW_FORM_addrx
|
||||
.byte 18 # DW_AT_high_pc
|
||||
.byte 6 # DW_FORM_data4
|
||||
.byte 115 # DW_AT_addr_base
|
||||
.byte 23 # DW_FORM_sec_offset
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 2 # Abbreviation Code
|
||||
.byte 52 # DW_TAG_variable
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 3 # DW_AT_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 73 # DW_AT_type
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.byte 63 # DW_AT_external
|
||||
.byte 25 # DW_FORM_flag_present
|
||||
.byte 58 # DW_AT_decl_file
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 59 # DW_AT_decl_line
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 24 # DW_FORM_exprloc
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 3 # Abbreviation Code
|
||||
.byte 36 # DW_TAG_base_type
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 3 # DW_AT_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 62 # DW_AT_encoding
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 11 # DW_AT_byte_size
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 4 # Abbreviation Code
|
||||
.byte 46 # DW_TAG_subprogram
|
||||
.byte 1 # DW_CHILDREN_yes
|
||||
.byte 17 # DW_AT_low_pc
|
||||
.byte 27 # DW_FORM_addrx
|
||||
.byte 18 # DW_AT_high_pc
|
||||
.byte 6 # DW_FORM_data4
|
||||
.byte 64 # DW_AT_frame_base
|
||||
.byte 24 # DW_FORM_exprloc
|
||||
.byte 110 # DW_AT_linkage_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 3 # DW_AT_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 58 # DW_AT_decl_file
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 59 # DW_AT_decl_line
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 73 # DW_AT_type
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.byte 63 # DW_AT_external
|
||||
.byte 25 # DW_FORM_flag_present
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 5 # Abbreviation Code
|
||||
.byte 5 # DW_TAG_formal_parameter
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 24 # DW_FORM_exprloc
|
||||
.byte 3 # DW_AT_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 58 # DW_AT_decl_file
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 59 # DW_AT_decl_line
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 73 # DW_AT_type
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 0 # EOM(3)
|
||||
.section .debug_info,"",@progbits
|
||||
.Lcu_begin0:
|
||||
.long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
|
||||
.Ldebug_info_start0:
|
||||
.short 5 # DWARF version number
|
||||
.byte 1 # DWARF Unit Type
|
||||
.byte 8 # Address Size (in bytes)
|
||||
.long .debug_abbrev # Offset Into Abbrev. Section
|
||||
.byte 1 # Abbrev [1] 0xc:0x59 DW_TAG_compile_unit
|
||||
.byte 0 # DW_AT_producer
|
||||
.short 33 # DW_AT_language
|
||||
.byte 1 # DW_AT_name
|
||||
.long .Lstr_offsets_base0 # DW_AT_str_offsets_base
|
||||
.long .Lline_table_start0 # DW_AT_stmt_list
|
||||
.byte 2 # DW_AT_comp_dir
|
||||
.byte 2 # DW_AT_low_pc
|
||||
.long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
|
||||
.long .Laddr_table_base0 # DW_AT_addr_base
|
||||
.byte 2 # Abbrev [2] 0x23:0xb DW_TAG_variable
|
||||
.byte 3 # DW_AT_name
|
||||
.long 46 # DW_AT_type
|
||||
# DW_AT_external
|
||||
.byte 0 # DW_AT_decl_file
|
||||
.byte 1 # DW_AT_decl_line
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 161
|
||||
.byte 0
|
||||
.byte 3 # Abbrev [3] 0x2e:0x4 DW_TAG_base_type
|
||||
.byte 4 # DW_AT_name
|
||||
.byte 5 # DW_AT_encoding
|
||||
.byte 4 # DW_AT_byte_size
|
||||
.byte 2 # Abbrev [2] 0x32:0xb DW_TAG_variable
|
||||
.byte 5 # DW_AT_name
|
||||
.long 46 # DW_AT_type
|
||||
# DW_AT_external
|
||||
.byte 0 # DW_AT_decl_file
|
||||
.byte 2 # DW_AT_decl_line
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 161
|
||||
.byte 1
|
||||
.byte 4 # Abbrev [4] 0x3d:0x27 DW_TAG_subprogram
|
||||
.byte 2 # DW_AT_low_pc
|
||||
.long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
|
||||
.byte 1 # DW_AT_frame_base
|
||||
.byte 86
|
||||
.byte 6 # DW_AT_linkage_name
|
||||
.byte 7 # DW_AT_name
|
||||
.byte 0 # DW_AT_decl_file
|
||||
.byte 4 # DW_AT_decl_line
|
||||
.long 46 # DW_AT_type
|
||||
# DW_AT_external
|
||||
.byte 5 # Abbrev [5] 0x4d:0xb DW_TAG_formal_parameter
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 145
|
||||
.byte 124
|
||||
.byte 8 # DW_AT_name
|
||||
.byte 0 # DW_AT_decl_file
|
||||
.byte 4 # DW_AT_decl_line
|
||||
.long 46 # DW_AT_type
|
||||
.byte 5 # Abbrev [5] 0x58:0xb DW_TAG_formal_parameter
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 145
|
||||
.byte 120
|
||||
.byte 9 # DW_AT_name
|
||||
.byte 0 # DW_AT_decl_file
|
||||
.byte 4 # DW_AT_decl_line
|
||||
.long 46 # DW_AT_type
|
||||
.byte 0 # End Of Children Mark
|
||||
.byte 0 # End Of Children Mark
|
||||
.Ldebug_info_end0:
|
||||
.section .debug_str_offsets,"",@progbits
|
||||
.long 44 # Length of String Offsets Set
|
||||
.short 5
|
||||
.short 0
|
||||
.Lstr_offsets_base0:
|
||||
.section .debug_str,"MS",@progbits,1
|
||||
.Linfo_string0:
|
||||
.asciz "clang version 15.0.0" # string offset=0
|
||||
.Linfo_string1:
|
||||
.asciz "helper.cpp" # string offset=21
|
||||
.Linfo_string2:
|
||||
.asciz "." # string offset=32
|
||||
.Linfo_string3:
|
||||
.asciz "z" # string offset=34
|
||||
.Linfo_string4:
|
||||
.asciz "int" # string offset=36
|
||||
.Linfo_string5:
|
||||
.asciz "d" # string offset=40
|
||||
.Linfo_string6:
|
||||
.asciz "_Z6helperii" # string offset=42
|
||||
.Linfo_string7:
|
||||
.asciz "helper" # string offset=54
|
||||
.Linfo_string8:
|
||||
.asciz "z_" # string offset=61
|
||||
.Linfo_string9:
|
||||
.asciz "d_" # string offset=64
|
||||
.section .debug_str_offsets,"",@progbits
|
||||
.long .Linfo_string0
|
||||
.long .Linfo_string1
|
||||
.long .Linfo_string2
|
||||
.long .Linfo_string3
|
||||
.long .Linfo_string4
|
||||
.long .Linfo_string5
|
||||
.long .Linfo_string6
|
||||
.long .Linfo_string7
|
||||
.long .Linfo_string8
|
||||
.long .Linfo_string9
|
||||
.section .debug_addr,"",@progbits
|
||||
.long .Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution
|
||||
.Ldebug_addr_start0:
|
||||
.short 5 # DWARF version number
|
||||
.byte 8 # Address size
|
||||
.byte 0 # Segment selector size
|
||||
.Laddr_table_base0:
|
||||
.quad z
|
||||
.quad d
|
||||
.quad .Lfunc_begin0
|
||||
.Ldebug_addr_end0:
|
||||
.ident "clang version 15.0.0"
|
||||
.section ".note.GNU-stack","",@progbits
|
||||
.section .debug_line,"",@progbits
|
||||
.Lline_table_start0:
|
||||
@@ -1,129 +0,0 @@
|
||||
; clang++ -g -gdwarf-5 -gsplit-dwarf=split -emit-llvm -S main.cpp
|
||||
; void use(int * x, int * y) {
|
||||
; *x += 4;
|
||||
; *y -= 2;
|
||||
; }
|
||||
;
|
||||
; int helper(int z_, int d_);
|
||||
; int x = 0;
|
||||
; int y = 1;
|
||||
; int main(int argc, char *argv[]) {
|
||||
; x = argc;
|
||||
; y = argc + 3;
|
||||
; use(&x, &y);
|
||||
; return helper(x, y);
|
||||
; }
|
||||
|
||||
; ModuleID = 'main.cpp'
|
||||
source_filename = "main.cpp"
|
||||
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
|
||||
target triple = "x86_64-unknown-linux-gnu"
|
||||
|
||||
@x = dso_local global i32 0, align 4, !dbg !0
|
||||
@y = dso_local global i32 1, align 4, !dbg !5
|
||||
|
||||
; Function Attrs: mustprogress noinline nounwind optnone uwtable
|
||||
define dso_local void @_Z3usePiS_(i32* noundef %x, i32* noundef %y) #0 !dbg !14 {
|
||||
entry:
|
||||
%x.addr = alloca i32*, align 8
|
||||
%y.addr = alloca i32*, align 8
|
||||
store i32* %x, i32** %x.addr, align 8
|
||||
call void @llvm.dbg.declare(metadata i32** %x.addr, metadata !19, metadata !DIExpression()), !dbg !20
|
||||
store i32* %y, i32** %y.addr, align 8
|
||||
call void @llvm.dbg.declare(metadata i32** %y.addr, metadata !21, metadata !DIExpression()), !dbg !22
|
||||
%0 = load i32*, i32** %x.addr, align 8, !dbg !23
|
||||
%1 = load i32, i32* %0, align 4, !dbg !24
|
||||
%add = add nsw i32 %1, 4, !dbg !24
|
||||
store i32 %add, i32* %0, align 4, !dbg !24
|
||||
%2 = load i32*, i32** %y.addr, align 8, !dbg !25
|
||||
%3 = load i32, i32* %2, align 4, !dbg !26
|
||||
%sub = sub nsw i32 %3, 2, !dbg !26
|
||||
store i32 %sub, i32* %2, align 4, !dbg !26
|
||||
ret void, !dbg !27
|
||||
}
|
||||
|
||||
; Function Attrs: nocallback nofree nosync nounwind readnone speculatable willreturn
|
||||
declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
|
||||
|
||||
; Function Attrs: mustprogress noinline norecurse optnone uwtable
|
||||
define dso_local noundef i32 @main(i32 noundef %argc, i8** noundef %argv) #2 !dbg !28 {
|
||||
entry:
|
||||
%retval = alloca i32, align 4
|
||||
%argc.addr = alloca i32, align 4
|
||||
%argv.addr = alloca i8**, align 8
|
||||
store i32 0, i32* %retval, align 4
|
||||
store i32 %argc, i32* %argc.addr, align 4
|
||||
call void @llvm.dbg.declare(metadata i32* %argc.addr, metadata !34, metadata !DIExpression()), !dbg !35
|
||||
store i8** %argv, i8*** %argv.addr, align 8
|
||||
call void @llvm.dbg.declare(metadata i8*** %argv.addr, metadata !36, metadata !DIExpression()), !dbg !37
|
||||
%0 = load i32, i32* %argc.addr, align 4, !dbg !38
|
||||
store i32 %0, i32* @x, align 4, !dbg !39
|
||||
%1 = load i32, i32* %argc.addr, align 4, !dbg !40
|
||||
%add = add nsw i32 %1, 3, !dbg !41
|
||||
store i32 %add, i32* @y, align 4, !dbg !42
|
||||
call void @_Z3usePiS_(i32* noundef @x, i32* noundef @y), !dbg !43
|
||||
%2 = load i32, i32* @x, align 4, !dbg !44
|
||||
%3 = load i32, i32* @y, align 4, !dbg !45
|
||||
%call = call noundef i32 @_Z6helperii(i32 noundef %2, i32 noundef %3), !dbg !46
|
||||
ret i32 %call, !dbg !47
|
||||
}
|
||||
|
||||
declare dso_local noundef i32 @_Z6helperii(i32 noundef, i32 noundef) #3
|
||||
|
||||
attributes #0 = { mustprogress noinline nounwind optnone uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
|
||||
attributes #1 = { nocallback nofree nosync nounwind readnone speculatable willreturn }
|
||||
attributes #2 = { mustprogress noinline norecurse optnone uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
|
||||
attributes #3 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
|
||||
|
||||
!llvm.dbg.cu = !{!2}
|
||||
!llvm.module.flags = !{!8, !9, !10, !11, !12}
|
||||
!llvm.ident = !{!13}
|
||||
|
||||
!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
|
||||
!1 = distinct !DIGlobalVariable(name: "x", scope: !2, file: !3, line: 7, type: !7, isLocal: false, isDefinition: true)
|
||||
!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !3, producer: "clang version 15.0.0", isOptimized: false, runtimeVersion: 0, splitDebugFilename: "main.dwo", emissionKind: FullDebug, globals: !4, splitDebugInlining: false, nameTableKind: GNU)
|
||||
!3 = !DIFile(filename: "main.cpp", directory: ".", checksumkind: CSK_MD5, checksum: "1f627913a0daee879e00a3a51726f0ef")
|
||||
!4 = !{!0, !5}
|
||||
!5 = !DIGlobalVariableExpression(var: !6, expr: !DIExpression())
|
||||
!6 = distinct !DIGlobalVariable(name: "y", scope: !2, file: !3, line: 8, type: !7, isLocal: false, isDefinition: true)
|
||||
!7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
|
||||
!8 = !{i32 7, !"Dwarf Version", i32 5}
|
||||
!9 = !{i32 2, !"Debug Info Version", i32 3}
|
||||
!10 = !{i32 1, !"wchar_size", i32 4}
|
||||
!11 = !{i32 7, !"uwtable", i32 2}
|
||||
!12 = !{i32 7, !"frame-pointer", i32 2}
|
||||
!13 = !{!"clang version 15.0.0"}
|
||||
!14 = distinct !DISubprogram(name: "use", linkageName: "_Z3usePiS_", scope: !3, file: !3, line: 1, type: !15, scopeLine: 1, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !18)
|
||||
!15 = !DISubroutineType(types: !16)
|
||||
!16 = !{null, !17, !17}
|
||||
!17 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !7, size: 64)
|
||||
!18 = !{}
|
||||
!19 = !DILocalVariable(name: "x", arg: 1, scope: !14, file: !3, line: 1, type: !17)
|
||||
!20 = !DILocation(line: 1, column: 16, scope: !14)
|
||||
!21 = !DILocalVariable(name: "y", arg: 2, scope: !14, file: !3, line: 1, type: !17)
|
||||
!22 = !DILocation(line: 1, column: 25, scope: !14)
|
||||
!23 = !DILocation(line: 2, column: 2, scope: !14)
|
||||
!24 = !DILocation(line: 2, column: 4, scope: !14)
|
||||
!25 = !DILocation(line: 3, column: 2, scope: !14)
|
||||
!26 = !DILocation(line: 3, column: 4, scope: !14)
|
||||
!27 = !DILocation(line: 4, column: 1, scope: !14)
|
||||
!28 = distinct !DISubprogram(name: "main", scope: !3, file: !3, line: 9, type: !29, scopeLine: 9, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !18)
|
||||
!29 = !DISubroutineType(types: !30)
|
||||
!30 = !{!7, !7, !31}
|
||||
!31 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !32, size: 64)
|
||||
!32 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !33, size: 64)
|
||||
!33 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char)
|
||||
!34 = !DILocalVariable(name: "argc", arg: 1, scope: !28, file: !3, line: 9, type: !7)
|
||||
!35 = !DILocation(line: 9, column: 15, scope: !28)
|
||||
!36 = !DILocalVariable(name: "argv", arg: 2, scope: !28, file: !3, line: 9, type: !31)
|
||||
!37 = !DILocation(line: 9, column: 27, scope: !28)
|
||||
!38 = !DILocation(line: 10, column: 8, scope: !28)
|
||||
!39 = !DILocation(line: 10, column: 6, scope: !28)
|
||||
!40 = !DILocation(line: 11, column: 8, scope: !28)
|
||||
!41 = !DILocation(line: 11, column: 13, scope: !28)
|
||||
!42 = !DILocation(line: 11, column: 6, scope: !28)
|
||||
!43 = !DILocation(line: 12, column: 4, scope: !28)
|
||||
!44 = !DILocation(line: 13, column: 18, scope: !28)
|
||||
!45 = !DILocation(line: 13, column: 21, scope: !28)
|
||||
!46 = !DILocation(line: 13, column: 11, scope: !28)
|
||||
!47 = !DILocation(line: 13, column: 4, scope: !28)
|
||||
476
bolt/test/X86/Inputs/dwarf5-df-mono-main.s
Normal file
476
bolt/test/X86/Inputs/dwarf5-df-mono-main.s
Normal file
@@ -0,0 +1,476 @@
|
||||
# clang++ -g -gdwarf-5 -gsplit-dwarf=split -emit-llvm -S main.cpp
|
||||
# llc -O0 -mtriple=x86_64-unknown-linux-gnu main.ll
|
||||
# void use(int * x, int * y) {
|
||||
# *x += 4;
|
||||
# *y -= 2;
|
||||
# }
|
||||
#
|
||||
# int helper(int z_, int d_);
|
||||
# int x = 0;
|
||||
# int y = 1;
|
||||
# int main(int argc, char *argv[]) {
|
||||
# x = argc;
|
||||
# y = argc + 3;
|
||||
# use(&x, &y);
|
||||
# return helper(x, y);
|
||||
# }
|
||||
|
||||
.text
|
||||
.file "main.cpp"
|
||||
.file 0 "." "main.cpp" md5 0x1f627913a0daee879e00a3a51726f0ef
|
||||
.globl _Z3usePiS_ # -- Begin function _Z3usePiS_
|
||||
.p2align 4, 0x90
|
||||
.type _Z3usePiS_,@function
|
||||
_Z3usePiS_: # @_Z3usePiS_
|
||||
.Lfunc_begin0:
|
||||
.loc 0 1 0 # main.cpp:1:0
|
||||
.cfi_startproc
|
||||
# %bb.0: # %entry
|
||||
pushq %rbp
|
||||
.cfi_def_cfa_offset 16
|
||||
.cfi_offset %rbp, -16
|
||||
movq %rsp, %rbp
|
||||
.cfi_def_cfa_register %rbp
|
||||
movq %rdi, -8(%rbp)
|
||||
movq %rsi, -16(%rbp)
|
||||
.Ltmp0:
|
||||
.loc 0 2 2 prologue_end # main.cpp:2:2
|
||||
movq -8(%rbp), %rax
|
||||
.loc 0 2 4 is_stmt 0 # main.cpp:2:4
|
||||
movl (%rax), %ecx
|
||||
addl $4, %ecx
|
||||
movl %ecx, (%rax)
|
||||
.loc 0 3 2 is_stmt 1 # main.cpp:3:2
|
||||
movq -16(%rbp), %rax
|
||||
.loc 0 3 4 is_stmt 0 # main.cpp:3:4
|
||||
movl (%rax), %ecx
|
||||
subl $2, %ecx
|
||||
movl %ecx, (%rax)
|
||||
.loc 0 4 1 is_stmt 1 # main.cpp:4:1
|
||||
popq %rbp
|
||||
.cfi_def_cfa %rsp, 8
|
||||
retq
|
||||
.Ltmp1:
|
||||
.Lfunc_end0:
|
||||
.size _Z3usePiS_, .Lfunc_end0-_Z3usePiS_
|
||||
.cfi_endproc
|
||||
# -- End function
|
||||
.globl main # -- Begin function main
|
||||
.p2align 4, 0x90
|
||||
.type main,@function
|
||||
main: # @main
|
||||
.Lfunc_begin1:
|
||||
.loc 0 9 0 # main.cpp:9:0
|
||||
.cfi_startproc
|
||||
# %bb.0: # %entry
|
||||
pushq %rbp
|
||||
.cfi_def_cfa_offset 16
|
||||
.cfi_offset %rbp, -16
|
||||
movq %rsp, %rbp
|
||||
.cfi_def_cfa_register %rbp
|
||||
subq $16, %rsp
|
||||
movl $0, -4(%rbp)
|
||||
movl %edi, -8(%rbp)
|
||||
movq %rsi, -16(%rbp)
|
||||
.Ltmp2:
|
||||
.loc 0 10 8 prologue_end # main.cpp:10:8
|
||||
movl -8(%rbp), %eax
|
||||
.loc 0 10 6 is_stmt 0 # main.cpp:10:6
|
||||
movl %eax, x
|
||||
.loc 0 11 8 is_stmt 1 # main.cpp:11:8
|
||||
movl -8(%rbp), %eax
|
||||
.loc 0 11 13 is_stmt 0 # main.cpp:11:13
|
||||
addl $3, %eax
|
||||
.loc 0 11 6 # main.cpp:11:6
|
||||
movl %eax, y
|
||||
.loc 0 12 4 is_stmt 1 # main.cpp:12:4
|
||||
movabsq $x, %rdi
|
||||
movabsq $y, %rsi
|
||||
callq _Z3usePiS_
|
||||
.loc 0 13 18 # main.cpp:13:18
|
||||
movl x, %edi
|
||||
.loc 0 13 21 is_stmt 0 # main.cpp:13:21
|
||||
movl y, %esi
|
||||
.loc 0 13 11 # main.cpp:13:11
|
||||
callq _Z6helperii
|
||||
.loc 0 13 4 # main.cpp:13:4
|
||||
addq $16, %rsp
|
||||
popq %rbp
|
||||
.cfi_def_cfa %rsp, 8
|
||||
retq
|
||||
.Ltmp3:
|
||||
.Lfunc_end1:
|
||||
.size main, .Lfunc_end1-main
|
||||
.cfi_endproc
|
||||
# -- End function
|
||||
.type x,@object # @x
|
||||
.bss
|
||||
.globl x
|
||||
.p2align 2
|
||||
x:
|
||||
.long 0 # 0x0
|
||||
.size x, 4
|
||||
|
||||
.type y,@object # @y
|
||||
.data
|
||||
.globl y
|
||||
.p2align 2
|
||||
y:
|
||||
.long 1 # 0x1
|
||||
.size y, 4
|
||||
|
||||
.section .debug_abbrev,"",@progbits
|
||||
.byte 1 # Abbreviation Code
|
||||
.byte 74 # DW_TAG_skeleton_unit
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 16 # DW_AT_stmt_list
|
||||
.byte 23 # DW_FORM_sec_offset
|
||||
.byte 114 # DW_AT_str_offsets_base
|
||||
.byte 23 # DW_FORM_sec_offset
|
||||
.byte 27 # DW_AT_comp_dir
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.ascii "\264B" # DW_AT_GNU_pubnames
|
||||
.byte 25 # DW_FORM_flag_present
|
||||
.byte 118 # DW_AT_dwo_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 17 # DW_AT_low_pc
|
||||
.byte 27 # DW_FORM_addrx
|
||||
.byte 18 # DW_AT_high_pc
|
||||
.byte 6 # DW_FORM_data4
|
||||
.byte 115 # DW_AT_addr_base
|
||||
.byte 23 # DW_FORM_sec_offset
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 0 # EOM(3)
|
||||
.section .debug_info,"",@progbits
|
||||
.Lcu_begin0:
|
||||
.long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
|
||||
.Ldebug_info_start0:
|
||||
.short 5 # DWARF version number
|
||||
.byte 4 # DWARF Unit Type
|
||||
.byte 8 # Address Size (in bytes)
|
||||
.long .debug_abbrev # Offset Into Abbrev. Section
|
||||
.quad 2452897014735893912
|
||||
.byte 1 # Abbrev [1] 0x14:0x14 DW_TAG_skeleton_unit
|
||||
.long .Lline_table_start0 # DW_AT_stmt_list
|
||||
.long .Lstr_offsets_base0 # DW_AT_str_offsets_base
|
||||
.byte 0 # DW_AT_comp_dir
|
||||
# DW_AT_GNU_pubnames
|
||||
.byte 1 # DW_AT_dwo_name
|
||||
.byte 2 # DW_AT_low_pc
|
||||
.long .Lfunc_end1-.Lfunc_begin0 # DW_AT_high_pc
|
||||
.long .Laddr_table_base0 # DW_AT_addr_base
|
||||
.Ldebug_info_end0:
|
||||
.section .debug_str_offsets,"",@progbits
|
||||
.long 12 # Length of String Offsets Set
|
||||
.short 5
|
||||
.short 0
|
||||
.Lstr_offsets_base0:
|
||||
.section .debug_str,"MS",@progbits,1
|
||||
.Lskel_string0:
|
||||
.asciz "." # string offset=0
|
||||
.Lskel_string1:
|
||||
.asciz "main.dwo" # string offset=2
|
||||
.section .debug_str_offsets,"",@progbits
|
||||
.long .Lskel_string0
|
||||
.long .Lskel_string1
|
||||
.section .debug_str_offsets.dwo,"e",@progbits
|
||||
.long 52 # Length of String Offsets Set
|
||||
.short 5
|
||||
.short 0
|
||||
.section .debug_str.dwo,"eMS",@progbits,1
|
||||
.Linfo_string0:
|
||||
.asciz "x" # string offset=0
|
||||
.Linfo_string1:
|
||||
.asciz "int" # string offset=2
|
||||
.Linfo_string2:
|
||||
.asciz "y" # string offset=6
|
||||
.Linfo_string3:
|
||||
.asciz "_Z3usePiS_" # string offset=8
|
||||
.Linfo_string4:
|
||||
.asciz "use" # string offset=19
|
||||
.Linfo_string5:
|
||||
.asciz "main" # string offset=23
|
||||
.Linfo_string6:
|
||||
.asciz "argc" # string offset=28
|
||||
.Linfo_string7:
|
||||
.asciz "argv" # string offset=33
|
||||
.Linfo_string8:
|
||||
.asciz "char" # string offset=38
|
||||
.Linfo_string9:
|
||||
.asciz "clang version 15.0.0" # string offset=43
|
||||
.Linfo_string10:
|
||||
.asciz "main.cpp" # string offset=64
|
||||
.Linfo_string11:
|
||||
.asciz "main.dwo" # string offset=73
|
||||
.section .debug_str_offsets.dwo,"e",@progbits
|
||||
.long 0
|
||||
.long 2
|
||||
.long 6
|
||||
.long 8
|
||||
.long 19
|
||||
.long 23
|
||||
.long 28
|
||||
.long 33
|
||||
.long 38
|
||||
.long 43
|
||||
.long 64
|
||||
.long 73
|
||||
.section .debug_info.dwo,"e",@progbits
|
||||
.long .Ldebug_info_dwo_end0-.Ldebug_info_dwo_start0 # Length of Unit
|
||||
.Ldebug_info_dwo_start0:
|
||||
.short 5 # DWARF version number
|
||||
.byte 5 # DWARF Unit Type
|
||||
.byte 8 # Address Size (in bytes)
|
||||
.long 0 # Offset Into Abbrev. Section
|
||||
.quad 2452897014735893912
|
||||
.byte 1 # Abbrev [1] 0x14:0x7d DW_TAG_compile_unit
|
||||
.byte 9 # DW_AT_producer
|
||||
.short 33 # DW_AT_language
|
||||
.byte 10 # DW_AT_name
|
||||
.byte 11 # DW_AT_dwo_name
|
||||
.byte 2 # Abbrev [2] 0x1a:0xb DW_TAG_variable
|
||||
.byte 0 # DW_AT_name
|
||||
.long 37 # DW_AT_type
|
||||
# DW_AT_external
|
||||
.byte 0 # DW_AT_decl_file
|
||||
.byte 7 # DW_AT_decl_line
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 161
|
||||
.byte 0
|
||||
.byte 3 # Abbrev [3] 0x25:0x4 DW_TAG_base_type
|
||||
.byte 1 # DW_AT_name
|
||||
.byte 5 # DW_AT_encoding
|
||||
.byte 4 # DW_AT_byte_size
|
||||
.byte 2 # Abbrev [2] 0x29:0xb DW_TAG_variable
|
||||
.byte 2 # DW_AT_name
|
||||
.long 37 # DW_AT_type
|
||||
# DW_AT_external
|
||||
.byte 0 # DW_AT_decl_file
|
||||
.byte 8 # DW_AT_decl_line
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 161
|
||||
.byte 1
|
||||
.byte 4 # Abbrev [4] 0x34:0x23 DW_TAG_subprogram
|
||||
.byte 2 # DW_AT_low_pc
|
||||
.long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
|
||||
.byte 1 # DW_AT_frame_base
|
||||
.byte 86
|
||||
.byte 3 # DW_AT_linkage_name
|
||||
.byte 4 # DW_AT_name
|
||||
.byte 0 # DW_AT_decl_file
|
||||
.byte 1 # DW_AT_decl_line
|
||||
# DW_AT_external
|
||||
.byte 5 # Abbrev [5] 0x40:0xb DW_TAG_formal_parameter
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 145
|
||||
.byte 120
|
||||
.byte 0 # DW_AT_name
|
||||
.byte 0 # DW_AT_decl_file
|
||||
.byte 1 # DW_AT_decl_line
|
||||
.long 125 # DW_AT_type
|
||||
.byte 5 # Abbrev [5] 0x4b:0xb DW_TAG_formal_parameter
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 145
|
||||
.byte 112
|
||||
.byte 2 # DW_AT_name
|
||||
.byte 0 # DW_AT_decl_file
|
||||
.byte 1 # DW_AT_decl_line
|
||||
.long 125 # DW_AT_type
|
||||
.byte 0 # End Of Children Mark
|
||||
.byte 6 # Abbrev [6] 0x57:0x26 DW_TAG_subprogram
|
||||
.byte 3 # DW_AT_low_pc
|
||||
.long .Lfunc_end1-.Lfunc_begin1 # DW_AT_high_pc
|
||||
.byte 1 # DW_AT_frame_base
|
||||
.byte 86
|
||||
.byte 5 # DW_AT_name
|
||||
.byte 0 # DW_AT_decl_file
|
||||
.byte 9 # DW_AT_decl_line
|
||||
.long 37 # DW_AT_type
|
||||
# DW_AT_external
|
||||
.byte 5 # Abbrev [5] 0x66:0xb DW_TAG_formal_parameter
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 145
|
||||
.byte 120
|
||||
.byte 6 # DW_AT_name
|
||||
.byte 0 # DW_AT_decl_file
|
||||
.byte 9 # DW_AT_decl_line
|
||||
.long 37 # DW_AT_type
|
||||
.byte 5 # Abbrev [5] 0x71:0xb DW_TAG_formal_parameter
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 145
|
||||
.byte 112
|
||||
.byte 7 # DW_AT_name
|
||||
.byte 0 # DW_AT_decl_file
|
||||
.byte 9 # DW_AT_decl_line
|
||||
.long 130 # DW_AT_type
|
||||
.byte 0 # End Of Children Mark
|
||||
.byte 7 # Abbrev [7] 0x7d:0x5 DW_TAG_pointer_type
|
||||
.long 37 # DW_AT_type
|
||||
.byte 7 # Abbrev [7] 0x82:0x5 DW_TAG_pointer_type
|
||||
.long 135 # DW_AT_type
|
||||
.byte 7 # Abbrev [7] 0x87:0x5 DW_TAG_pointer_type
|
||||
.long 140 # DW_AT_type
|
||||
.byte 3 # Abbrev [3] 0x8c:0x4 DW_TAG_base_type
|
||||
.byte 8 # DW_AT_name
|
||||
.byte 6 # DW_AT_encoding
|
||||
.byte 1 # DW_AT_byte_size
|
||||
.byte 0 # End Of Children Mark
|
||||
.Ldebug_info_dwo_end0:
|
||||
.section .debug_abbrev.dwo,"e",@progbits
|
||||
.byte 1 # Abbreviation Code
|
||||
.byte 17 # DW_TAG_compile_unit
|
||||
.byte 1 # DW_CHILDREN_yes
|
||||
.byte 37 # DW_AT_producer
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 19 # DW_AT_language
|
||||
.byte 5 # DW_FORM_data2
|
||||
.byte 3 # DW_AT_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 118 # DW_AT_dwo_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 2 # Abbreviation Code
|
||||
.byte 52 # DW_TAG_variable
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 3 # DW_AT_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 73 # DW_AT_type
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.byte 63 # DW_AT_external
|
||||
.byte 25 # DW_FORM_flag_present
|
||||
.byte 58 # DW_AT_decl_file
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 59 # DW_AT_decl_line
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 24 # DW_FORM_exprloc
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 3 # Abbreviation Code
|
||||
.byte 36 # DW_TAG_base_type
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 3 # DW_AT_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 62 # DW_AT_encoding
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 11 # DW_AT_byte_size
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 4 # Abbreviation Code
|
||||
.byte 46 # DW_TAG_subprogram
|
||||
.byte 1 # DW_CHILDREN_yes
|
||||
.byte 17 # DW_AT_low_pc
|
||||
.byte 27 # DW_FORM_addrx
|
||||
.byte 18 # DW_AT_high_pc
|
||||
.byte 6 # DW_FORM_data4
|
||||
.byte 64 # DW_AT_frame_base
|
||||
.byte 24 # DW_FORM_exprloc
|
||||
.byte 110 # DW_AT_linkage_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 3 # DW_AT_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 58 # DW_AT_decl_file
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 59 # DW_AT_decl_line
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 63 # DW_AT_external
|
||||
.byte 25 # DW_FORM_flag_present
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 5 # Abbreviation Code
|
||||
.byte 5 # DW_TAG_formal_parameter
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 24 # DW_FORM_exprloc
|
||||
.byte 3 # DW_AT_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 58 # DW_AT_decl_file
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 59 # DW_AT_decl_line
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 73 # DW_AT_type
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 6 # Abbreviation Code
|
||||
.byte 46 # DW_TAG_subprogram
|
||||
.byte 1 # DW_CHILDREN_yes
|
||||
.byte 17 # DW_AT_low_pc
|
||||
.byte 27 # DW_FORM_addrx
|
||||
.byte 18 # DW_AT_high_pc
|
||||
.byte 6 # DW_FORM_data4
|
||||
.byte 64 # DW_AT_frame_base
|
||||
.byte 24 # DW_FORM_exprloc
|
||||
.byte 3 # DW_AT_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 58 # DW_AT_decl_file
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 59 # DW_AT_decl_line
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 73 # DW_AT_type
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.byte 63 # DW_AT_external
|
||||
.byte 25 # DW_FORM_flag_present
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 7 # Abbreviation Code
|
||||
.byte 15 # DW_TAG_pointer_type
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 73 # DW_AT_type
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 0 # EOM(3)
|
||||
.section .debug_addr,"",@progbits
|
||||
.long .Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution
|
||||
.Ldebug_addr_start0:
|
||||
.short 5 # DWARF version number
|
||||
.byte 8 # Address size
|
||||
.byte 0 # Segment selector size
|
||||
.Laddr_table_base0:
|
||||
.quad x
|
||||
.quad y
|
||||
.quad .Lfunc_begin0
|
||||
.quad .Lfunc_begin1
|
||||
.Ldebug_addr_end0:
|
||||
.section .debug_gnu_pubnames,"",@progbits
|
||||
.long .LpubNames_end0-.LpubNames_start0 # Length of Public Names Info
|
||||
.LpubNames_start0:
|
||||
.short 2 # DWARF Version
|
||||
.long .Lcu_begin0 # Offset of Compilation Unit Info
|
||||
.long 40 # Compilation Unit Length
|
||||
.long 87 # DIE offset
|
||||
.byte 48 # Attributes: FUNCTION, EXTERNAL
|
||||
.asciz "main" # External Name
|
||||
.long 26 # DIE offset
|
||||
.byte 32 # Attributes: VARIABLE, EXTERNAL
|
||||
.asciz "x" # External Name
|
||||
.long 41 # DIE offset
|
||||
.byte 32 # Attributes: VARIABLE, EXTERNAL
|
||||
.asciz "y" # External Name
|
||||
.long 52 # DIE offset
|
||||
.byte 48 # Attributes: FUNCTION, EXTERNAL
|
||||
.asciz "use" # External Name
|
||||
.long 0 # End Mark
|
||||
.LpubNames_end0:
|
||||
.section .debug_gnu_pubtypes,"",@progbits
|
||||
.long .LpubTypes_end0-.LpubTypes_start0 # Length of Public Types Info
|
||||
.LpubTypes_start0:
|
||||
.short 2 # DWARF Version
|
||||
.long .Lcu_begin0 # Offset of Compilation Unit Info
|
||||
.long 40 # Compilation Unit Length
|
||||
.long 37 # DIE offset
|
||||
.byte 144 # Attributes: TYPE, STATIC
|
||||
.asciz "int" # External Name
|
||||
.long 140 # DIE offset
|
||||
.byte 144 # Attributes: TYPE, STATIC
|
||||
.asciz "char" # External Name
|
||||
.long 0 # End Mark
|
||||
.LpubTypes_end0:
|
||||
.ident "clang version 15.0.0"
|
||||
.section ".note.GNU-stack","",@progbits
|
||||
.section .debug_line,"",@progbits
|
||||
.Lline_table_start0:
|
||||
473
bolt/test/X86/Inputs/dwarf5-locaddrx.s
Normal file
473
bolt/test/X86/Inputs/dwarf5-locaddrx.s
Normal file
@@ -0,0 +1,473 @@
|
||||
# clang++ -g -gdwarf-5 -emit-llvm -S mainlocadddrx.cpp
|
||||
# llc -O0 -mtriple=x86_64-unknown-linux-gnu mainlocadddrx.ll
|
||||
# void use(int * x, int * y) {
|
||||
# *x += 4;
|
||||
# *y -= 2;
|
||||
# }
|
||||
#
|
||||
# int x = 0;
|
||||
# int y = 1;
|
||||
# int main(int argc, char *argv[]) {
|
||||
# x = argc;
|
||||
# y = argc + 3;
|
||||
# use(&x, &y);
|
||||
# return x + y;
|
||||
# }
|
||||
|
||||
.text
|
||||
.file "mainlocadddrx.cpp"
|
||||
.file 0 "." "mainlocadddrx.cpp" md5 0xd4fd79ce0087c4cefd089752bf2182c6
|
||||
.globl _Z3usePiS_ # -- Begin function _Z3usePiS_
|
||||
.p2align 4, 0x90
|
||||
.type _Z3usePiS_,@function
|
||||
_Z3usePiS_: # @_Z3usePiS_
|
||||
.Lfunc_begin0:
|
||||
.loc 0 1 0 # mainlocadddrx.cpp:1:0
|
||||
.cfi_startproc
|
||||
# %bb.0: # %entry
|
||||
pushq %rbp
|
||||
.cfi_def_cfa_offset 16
|
||||
.cfi_offset %rbp, -16
|
||||
movq %rsp, %rbp
|
||||
.cfi_def_cfa_register %rbp
|
||||
movq %rdi, -8(%rbp)
|
||||
movq %rsi, -16(%rbp)
|
||||
.Ltmp0:
|
||||
.loc 0 2 2 prologue_end # mainlocadddrx.cpp:2:2
|
||||
movq -8(%rbp), %rax
|
||||
.loc 0 2 4 is_stmt 0 # mainlocadddrx.cpp:2:4
|
||||
movl (%rax), %ecx
|
||||
addl $4, %ecx
|
||||
movl %ecx, (%rax)
|
||||
.loc 0 3 2 is_stmt 1 # mainlocadddrx.cpp:3:2
|
||||
movq -16(%rbp), %rax
|
||||
.loc 0 3 4 is_stmt 0 # mainlocadddrx.cpp:3:4
|
||||
movl (%rax), %ecx
|
||||
subl $2, %ecx
|
||||
movl %ecx, (%rax)
|
||||
.loc 0 4 1 is_stmt 1 # mainlocadddrx.cpp:4:1
|
||||
popq %rbp
|
||||
.cfi_def_cfa %rsp, 8
|
||||
retq
|
||||
.Ltmp1:
|
||||
.Lfunc_end0:
|
||||
.size _Z3usePiS_, .Lfunc_end0-_Z3usePiS_
|
||||
.cfi_endproc
|
||||
# -- End function
|
||||
.globl main # -- Begin function main
|
||||
.p2align 4, 0x90
|
||||
.type main,@function
|
||||
main: # @main
|
||||
.Lfunc_begin1:
|
||||
.loc 0 8 0 # mainlocadddrx.cpp:8:0
|
||||
.cfi_startproc
|
||||
# %bb.0: # %entry
|
||||
pushq %rbp
|
||||
.cfi_def_cfa_offset 16
|
||||
.cfi_offset %rbp, -16
|
||||
movq %rsp, %rbp
|
||||
.cfi_def_cfa_register %rbp
|
||||
subq $16, %rsp
|
||||
movl $0, -4(%rbp)
|
||||
movl %edi, -8(%rbp)
|
||||
movq %rsi, -16(%rbp)
|
||||
.Ltmp2:
|
||||
.loc 0 9 8 prologue_end # mainlocadddrx.cpp:9:8
|
||||
movl -8(%rbp), %eax
|
||||
.loc 0 9 6 is_stmt 0 # mainlocadddrx.cpp:9:6
|
||||
movl %eax, x
|
||||
.loc 0 10 8 is_stmt 1 # mainlocadddrx.cpp:10:8
|
||||
movl -8(%rbp), %eax
|
||||
.loc 0 10 13 is_stmt 0 # mainlocadddrx.cpp:10:13
|
||||
addl $3, %eax
|
||||
.loc 0 10 6 # mainlocadddrx.cpp:10:6
|
||||
movl %eax, y
|
||||
.loc 0 11 4 is_stmt 1 # mainlocadddrx.cpp:11:4
|
||||
movabsq $x, %rdi
|
||||
movabsq $y, %rsi
|
||||
callq _Z3usePiS_
|
||||
.loc 0 12 11 # mainlocadddrx.cpp:12:11
|
||||
movl x, %eax
|
||||
.loc 0 12 13 is_stmt 0 # mainlocadddrx.cpp:12:13
|
||||
addl y, %eax
|
||||
.loc 0 12 4 # mainlocadddrx.cpp:12:4
|
||||
addq $16, %rsp
|
||||
popq %rbp
|
||||
.cfi_def_cfa %rsp, 8
|
||||
retq
|
||||
.Ltmp3:
|
||||
.Lfunc_end1:
|
||||
.size main, .Lfunc_end1-main
|
||||
.cfi_endproc
|
||||
# -- End function
|
||||
.type x,@object # @x
|
||||
.bss
|
||||
.globl x
|
||||
.p2align 2
|
||||
x:
|
||||
.long 0 # 0x0
|
||||
.size x, 4
|
||||
|
||||
.type y,@object # @y
|
||||
.data
|
||||
.globl y
|
||||
.p2align 2
|
||||
y:
|
||||
.long 1 # 0x1
|
||||
.size y, 4
|
||||
|
||||
.section .debug_abbrev,"",@progbits
|
||||
.byte 1 # Abbreviation Code
|
||||
.byte 74 # DW_TAG_skeleton_unit
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 16 # DW_AT_stmt_list
|
||||
.byte 23 # DW_FORM_sec_offset
|
||||
.byte 114 # DW_AT_str_offsets_base
|
||||
.byte 23 # DW_FORM_sec_offset
|
||||
.byte 27 # DW_AT_comp_dir
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.ascii "\264B" # DW_AT_GNU_pubnames
|
||||
.byte 25 # DW_FORM_flag_present
|
||||
.byte 118 # DW_AT_dwo_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 17 # DW_AT_low_pc
|
||||
.byte 27 # DW_FORM_addrx
|
||||
.byte 18 # DW_AT_high_pc
|
||||
.byte 6 # DW_FORM_data4
|
||||
.byte 115 # DW_AT_addr_base
|
||||
.byte 23 # DW_FORM_sec_offset
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 0 # EOM(3)
|
||||
.section .debug_info,"",@progbits
|
||||
.Lcu_begin0:
|
||||
.long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
|
||||
.Ldebug_info_start0:
|
||||
.short 5 # DWARF version number
|
||||
.byte 4 # DWARF Unit Type
|
||||
.byte 8 # Address Size (in bytes)
|
||||
.long .debug_abbrev # Offset Into Abbrev. Section
|
||||
.quad 6364283817788887055
|
||||
.byte 1 # Abbrev [1] 0x14:0x14 DW_TAG_skeleton_unit
|
||||
.long .Lline_table_start0 # DW_AT_stmt_list
|
||||
.long .Lstr_offsets_base0 # DW_AT_str_offsets_base
|
||||
.byte 0 # DW_AT_comp_dir
|
||||
# DW_AT_GNU_pubnames
|
||||
.byte 1 # DW_AT_dwo_name
|
||||
.byte 2 # DW_AT_low_pc
|
||||
.long .Lfunc_end1-.Lfunc_begin0 # DW_AT_high_pc
|
||||
.long .Laddr_table_base0 # DW_AT_addr_base
|
||||
.Ldebug_info_end0:
|
||||
.section .debug_str_offsets,"",@progbits
|
||||
.long 12 # Length of String Offsets Set
|
||||
.short 5
|
||||
.short 0
|
||||
.Lstr_offsets_base0:
|
||||
.section .debug_str,"MS",@progbits,1
|
||||
.Lskel_string0:
|
||||
.asciz "." # string offset=0
|
||||
.Lskel_string1:
|
||||
.asciz "mainlocadddrx.dwo" # string offset=2
|
||||
.section .debug_str_offsets,"",@progbits
|
||||
.long .Lskel_string0
|
||||
.long .Lskel_string1
|
||||
.section .debug_str_offsets.dwo,"e",@progbits
|
||||
.long 52 # Length of String Offsets Set
|
||||
.short 5
|
||||
.short 0
|
||||
.section .debug_str.dwo,"eMS",@progbits,1
|
||||
.Linfo_string0:
|
||||
.asciz "x" # string offset=0
|
||||
.Linfo_string1:
|
||||
.asciz "int" # string offset=2
|
||||
.Linfo_string2:
|
||||
.asciz "y" # string offset=6
|
||||
.Linfo_string3:
|
||||
.asciz "_Z3usePiS_" # string offset=8
|
||||
.Linfo_string4:
|
||||
.asciz "use" # string offset=19
|
||||
.Linfo_string5:
|
||||
.asciz "main" # string offset=23
|
||||
.Linfo_string6:
|
||||
.asciz "argc" # string offset=28
|
||||
.Linfo_string7:
|
||||
.asciz "argv" # string offset=33
|
||||
.Linfo_string8:
|
||||
.asciz "char" # string offset=38
|
||||
.Linfo_string9:
|
||||
.asciz "clang version 15.0.0" # string offset=43
|
||||
.Linfo_string10:
|
||||
.asciz "mainlocadddrx.cpp" # string offset=64
|
||||
.Linfo_string11:
|
||||
.asciz "mainlocadddrx.dwo" # string offset=82
|
||||
.section .debug_str_offsets.dwo,"e",@progbits
|
||||
.long 0
|
||||
.long 2
|
||||
.long 6
|
||||
.long 8
|
||||
.long 19
|
||||
.long 23
|
||||
.long 28
|
||||
.long 33
|
||||
.long 38
|
||||
.long 43
|
||||
.long 64
|
||||
.long 82
|
||||
.section .debug_info.dwo,"e",@progbits
|
||||
.long .Ldebug_info_dwo_end0-.Ldebug_info_dwo_start0 # Length of Unit
|
||||
.Ldebug_info_dwo_start0:
|
||||
.short 5 # DWARF version number
|
||||
.byte 5 # DWARF Unit Type
|
||||
.byte 8 # Address Size (in bytes)
|
||||
.long 0 # Offset Into Abbrev. Section
|
||||
.quad 6364283817788887055
|
||||
.byte 1 # Abbrev [1] 0x14:0x7d DW_TAG_compile_unit
|
||||
.byte 9 # DW_AT_producer
|
||||
.short 33 # DW_AT_language
|
||||
.byte 10 # DW_AT_name
|
||||
.byte 11 # DW_AT_dwo_name
|
||||
.byte 2 # Abbrev [2] 0x1a:0xb DW_TAG_variable
|
||||
.byte 0 # DW_AT_name
|
||||
.long 37 # DW_AT_type
|
||||
# DW_AT_external
|
||||
.byte 0 # DW_AT_decl_file
|
||||
.byte 6 # DW_AT_decl_line
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 161
|
||||
.byte 0
|
||||
.byte 3 # Abbrev [3] 0x25:0x4 DW_TAG_base_type
|
||||
.byte 1 # DW_AT_name
|
||||
.byte 5 # DW_AT_encoding
|
||||
.byte 4 # DW_AT_byte_size
|
||||
.byte 2 # Abbrev [2] 0x29:0xb DW_TAG_variable
|
||||
.byte 2 # DW_AT_name
|
||||
.long 37 # DW_AT_type
|
||||
# DW_AT_external
|
||||
.byte 0 # DW_AT_decl_file
|
||||
.byte 7 # DW_AT_decl_line
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 161
|
||||
.byte 1
|
||||
.byte 4 # Abbrev [4] 0x34:0x23 DW_TAG_subprogram
|
||||
.byte 2 # DW_AT_low_pc
|
||||
.long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
|
||||
.byte 1 # DW_AT_frame_base
|
||||
.byte 86
|
||||
.byte 3 # DW_AT_linkage_name
|
||||
.byte 4 # DW_AT_name
|
||||
.byte 0 # DW_AT_decl_file
|
||||
.byte 1 # DW_AT_decl_line
|
||||
# DW_AT_external
|
||||
.byte 5 # Abbrev [5] 0x40:0xb DW_TAG_formal_parameter
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 145
|
||||
.byte 120
|
||||
.byte 0 # DW_AT_name
|
||||
.byte 0 # DW_AT_decl_file
|
||||
.byte 1 # DW_AT_decl_line
|
||||
.long 125 # DW_AT_type
|
||||
.byte 5 # Abbrev [5] 0x4b:0xb DW_TAG_formal_parameter
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 145
|
||||
.byte 112
|
||||
.byte 2 # DW_AT_name
|
||||
.byte 0 # DW_AT_decl_file
|
||||
.byte 1 # DW_AT_decl_line
|
||||
.long 125 # DW_AT_type
|
||||
.byte 0 # End Of Children Mark
|
||||
.byte 6 # Abbrev [6] 0x57:0x26 DW_TAG_subprogram
|
||||
.byte 3 # DW_AT_low_pc
|
||||
.long .Lfunc_end1-.Lfunc_begin1 # DW_AT_high_pc
|
||||
.byte 1 # DW_AT_frame_base
|
||||
.byte 86
|
||||
.byte 5 # DW_AT_name
|
||||
.byte 0 # DW_AT_decl_file
|
||||
.byte 8 # DW_AT_decl_line
|
||||
.long 37 # DW_AT_type
|
||||
# DW_AT_external
|
||||
.byte 5 # Abbrev [5] 0x66:0xb DW_TAG_formal_parameter
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 145
|
||||
.byte 120
|
||||
.byte 6 # DW_AT_name
|
||||
.byte 0 # DW_AT_decl_file
|
||||
.byte 8 # DW_AT_decl_line
|
||||
.long 37 # DW_AT_type
|
||||
.byte 5 # Abbrev [5] 0x71:0xb DW_TAG_formal_parameter
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 145
|
||||
.byte 112
|
||||
.byte 7 # DW_AT_name
|
||||
.byte 0 # DW_AT_decl_file
|
||||
.byte 8 # DW_AT_decl_line
|
||||
.long 130 # DW_AT_type
|
||||
.byte 0 # End Of Children Mark
|
||||
.byte 7 # Abbrev [7] 0x7d:0x5 DW_TAG_pointer_type
|
||||
.long 37 # DW_AT_type
|
||||
.byte 7 # Abbrev [7] 0x82:0x5 DW_TAG_pointer_type
|
||||
.long 135 # DW_AT_type
|
||||
.byte 7 # Abbrev [7] 0x87:0x5 DW_TAG_pointer_type
|
||||
.long 140 # DW_AT_type
|
||||
.byte 3 # Abbrev [3] 0x8c:0x4 DW_TAG_base_type
|
||||
.byte 8 # DW_AT_name
|
||||
.byte 6 # DW_AT_encoding
|
||||
.byte 1 # DW_AT_byte_size
|
||||
.byte 0 # End Of Children Mark
|
||||
.Ldebug_info_dwo_end0:
|
||||
.section .debug_abbrev.dwo,"e",@progbits
|
||||
.byte 1 # Abbreviation Code
|
||||
.byte 17 # DW_TAG_compile_unit
|
||||
.byte 1 # DW_CHILDREN_yes
|
||||
.byte 37 # DW_AT_producer
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 19 # DW_AT_language
|
||||
.byte 5 # DW_FORM_data2
|
||||
.byte 3 # DW_AT_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 118 # DW_AT_dwo_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 2 # Abbreviation Code
|
||||
.byte 52 # DW_TAG_variable
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 3 # DW_AT_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 73 # DW_AT_type
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.byte 63 # DW_AT_external
|
||||
.byte 25 # DW_FORM_flag_present
|
||||
.byte 58 # DW_AT_decl_file
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 59 # DW_AT_decl_line
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 24 # DW_FORM_exprloc
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 3 # Abbreviation Code
|
||||
.byte 36 # DW_TAG_base_type
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 3 # DW_AT_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 62 # DW_AT_encoding
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 11 # DW_AT_byte_size
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 4 # Abbreviation Code
|
||||
.byte 46 # DW_TAG_subprogram
|
||||
.byte 1 # DW_CHILDREN_yes
|
||||
.byte 17 # DW_AT_low_pc
|
||||
.byte 27 # DW_FORM_addrx
|
||||
.byte 18 # DW_AT_high_pc
|
||||
.byte 6 # DW_FORM_data4
|
||||
.byte 64 # DW_AT_frame_base
|
||||
.byte 24 # DW_FORM_exprloc
|
||||
.byte 110 # DW_AT_linkage_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 3 # DW_AT_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 58 # DW_AT_decl_file
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 59 # DW_AT_decl_line
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 63 # DW_AT_external
|
||||
.byte 25 # DW_FORM_flag_present
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 5 # Abbreviation Code
|
||||
.byte 5 # DW_TAG_formal_parameter
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 2 # DW_AT_location
|
||||
.byte 24 # DW_FORM_exprloc
|
||||
.byte 3 # DW_AT_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 58 # DW_AT_decl_file
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 59 # DW_AT_decl_line
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 73 # DW_AT_type
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 6 # Abbreviation Code
|
||||
.byte 46 # DW_TAG_subprogram
|
||||
.byte 1 # DW_CHILDREN_yes
|
||||
.byte 17 # DW_AT_low_pc
|
||||
.byte 27 # DW_FORM_addrx
|
||||
.byte 18 # DW_AT_high_pc
|
||||
.byte 6 # DW_FORM_data4
|
||||
.byte 64 # DW_AT_frame_base
|
||||
.byte 24 # DW_FORM_exprloc
|
||||
.byte 3 # DW_AT_name
|
||||
.byte 37 # DW_FORM_strx1
|
||||
.byte 58 # DW_AT_decl_file
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 59 # DW_AT_decl_line
|
||||
.byte 11 # DW_FORM_data1
|
||||
.byte 73 # DW_AT_type
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.byte 63 # DW_AT_external
|
||||
.byte 25 # DW_FORM_flag_present
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 7 # Abbreviation Code
|
||||
.byte 15 # DW_TAG_pointer_type
|
||||
.byte 0 # DW_CHILDREN_no
|
||||
.byte 73 # DW_AT_type
|
||||
.byte 19 # DW_FORM_ref4
|
||||
.byte 0 # EOM(1)
|
||||
.byte 0 # EOM(2)
|
||||
.byte 0 # EOM(3)
|
||||
.section .debug_addr,"",@progbits
|
||||
.long .Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution
|
||||
.Ldebug_addr_start0:
|
||||
.short 5 # DWARF version number
|
||||
.byte 8 # Address size
|
||||
.byte 0 # Segment selector size
|
||||
.Laddr_table_base0:
|
||||
.quad x
|
||||
.quad y
|
||||
.quad .Lfunc_begin0
|
||||
.quad .Lfunc_begin1
|
||||
.Ldebug_addr_end0:
|
||||
.section .debug_gnu_pubnames,"",@progbits
|
||||
.long .LpubNames_end0-.LpubNames_start0 # Length of Public Names Info
|
||||
.LpubNames_start0:
|
||||
.short 2 # DWARF Version
|
||||
.long .Lcu_begin0 # Offset of Compilation Unit Info
|
||||
.long 40 # Compilation Unit Length
|
||||
.long 87 # DIE offset
|
||||
.byte 48 # Attributes: FUNCTION, EXTERNAL
|
||||
.asciz "main" # External Name
|
||||
.long 26 # DIE offset
|
||||
.byte 32 # Attributes: VARIABLE, EXTERNAL
|
||||
.asciz "x" # External Name
|
||||
.long 41 # DIE offset
|
||||
.byte 32 # Attributes: VARIABLE, EXTERNAL
|
||||
.asciz "y" # External Name
|
||||
.long 52 # DIE offset
|
||||
.byte 48 # Attributes: FUNCTION, EXTERNAL
|
||||
.asciz "use" # External Name
|
||||
.long 0 # End Mark
|
||||
.LpubNames_end0:
|
||||
.section .debug_gnu_pubtypes,"",@progbits
|
||||
.long .LpubTypes_end0-.LpubTypes_start0 # Length of Public Types Info
|
||||
.LpubTypes_start0:
|
||||
.short 2 # DWARF Version
|
||||
.long .Lcu_begin0 # Offset of Compilation Unit Info
|
||||
.long 40 # Compilation Unit Length
|
||||
.long 37 # DIE offset
|
||||
.byte 144 # Attributes: TYPE, STATIC
|
||||
.asciz "int" # External Name
|
||||
.long 140 # DIE offset
|
||||
.byte 144 # Attributes: TYPE, STATIC
|
||||
.asciz "char" # External Name
|
||||
.long 0 # End Mark
|
||||
.LpubTypes_end0:
|
||||
.ident "clang version 15.0.0"
|
||||
.section ".note.GNU-stack","",@progbits
|
||||
.section .debug_line,"",@progbits
|
||||
.Lline_table_start0:
|
||||
@@ -1,10 +1,10 @@
|
||||
; RUN: rm -rf %t
|
||||
; RUN: mkdir %t
|
||||
; RUN: cd %t
|
||||
; RUN: llc -split-dwarf-file=main.dwo -split-dwarf-output=main.dwo -O2 -mtriple=x86_64-unknown-linux-gnu \
|
||||
; RUN: -filetype=obj %p/Inputs/dwarf4-df-dualcu-loclist-main.ll -o=main.o
|
||||
; RUN: llc -split-dwarf-file=helper.dwo -split-dwarf-output=helper.dwo -O2 -mtriple=x86_64-unknown-linux-gnu \
|
||||
; RUN: -filetype=obj %p/Inputs/dwarf4-df-dualcu-loclist-helper.ll -o=helper.o
|
||||
; RUN: llvm-mc -dwarf-version=4 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf4-df-dualcu-loclist-main.s \
|
||||
; RUN: -split-dwarf-file=main.dwo -o main.o
|
||||
; RUN: llvm-mc -dwarf-version=4 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf4-df-dualcu-loclist-helper.s \
|
||||
; RUN: -split-dwarf-file=helper.dwo -o helper.o
|
||||
; RUN: %clang %cflags -gdwarf-5 -O2 -gsplit-dwarf=split main.o helper.o -o main.exe
|
||||
; RUN: llvm-bolt main.exe -o main.exe.bolt --update-debug-sections
|
||||
; RUN: llvm-dwarfdump --show-form --verbose --debug-info main.dwo | FileCheck -check-prefix=PRE-BOLT-DWO-MAIN %s
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
; RUN: rm -rf %t
|
||||
; RUN: mkdir %t
|
||||
; RUN: cd %t
|
||||
; RUN: llc -split-dwarf-file=main.dwo -split-dwarf-output=main.dwo -O0 -mtriple=x86_64-unknown-linux-gnu \
|
||||
; RUN: -filetype=obj %p/Inputs/dwarf4-df-dualcu-main.ll -o=main.o
|
||||
; RUN: llc -split-dwarf-file=helper.dwo -split-dwarf-output=helper.dwo -O0 -mtriple=x86_64-unknown-linux-gnu \
|
||||
; RUN: -filetype=obj %p/Inputs/dwarf4-df-dualcu-helper.ll -o=helper.o
|
||||
;; RUN: llvm-mc -dwarf-version=4 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf4-df-dualcu-main.s \
|
||||
; RUN: -split-dwarf-file=main.dwo -o main.o
|
||||
; RUN: llvm-mc -dwarf-version=4 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf4-df-dualcu-helper.s \
|
||||
; RUN: -split-dwarf-file=helper.dwo -o helper.o
|
||||
; RUN: %clang %cflags -gdwarf-5 -gsplit-dwarf=split main.o helper.o -o main.exe
|
||||
; RUN: llvm-bolt main.exe -o main.exe.bolt --update-debug-sections
|
||||
; RUN: llvm-dwarfdump --show-form --verbose --debug-info main.exe | FileCheck -check-prefix=PRE-BOLT %s
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
; RUN: rm -rf %t
|
||||
; RUN: mkdir %t
|
||||
; RUN: cd %t
|
||||
; RUN: llc -split-dwarf-file=main.dwo -split-dwarf-output=main.dwo -O2 -mtriple=x86_64-unknown-linux-gnu \
|
||||
; RUN: -filetype=obj %p/Inputs/dwarf5-df-dualcu-loclist-main.ll -o=main.o
|
||||
; RUN: llc -split-dwarf-file=helper.dwo -split-dwarf-output=helper.dwo -O2 -mtriple=x86_64-unknown-linux-gnu \
|
||||
; RUN: -filetype=obj %p/Inputs/dwarf5-df-dualcu-loclist-helper.ll -o=helper.o
|
||||
; RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-df-dualcu-loclist-main.s \
|
||||
; RUN: -split-dwarf-file=main.dwo -o main.o
|
||||
; RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-df-dualcu-loclist-helper.s \
|
||||
; RUN: -split-dwarf-file=helper.dwo -o helper.o
|
||||
; RUN: %clang %cflags -gdwarf-5 -O2 -gsplit-dwarf=split main.o helper.o -o main.exe
|
||||
; RUN: llvm-bolt main.exe -o main.exe.bolt --update-debug-sections
|
||||
; RUN: llvm-dwarfdump --show-form --verbose --debug-info main.dwo | FileCheck -check-prefix=PRE-BOLT-DWO-MAIN %s
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
; RUN: rm -rf %t
|
||||
; RUN: mkdir %t
|
||||
; RUN: cd %t
|
||||
; RUN: llc -split-dwarf-file=main.dwo -split-dwarf-output=main.dwo -O0 -mtriple=x86_64-unknown-linux-gnu \
|
||||
; RUN: -filetype=obj %p/Inputs/dwarf5-df-dualcu-main.ll -o=main.o
|
||||
; RUN: llc -split-dwarf-file=helper.dwo -split-dwarf-output=helper.dwo -O0 -mtriple=x86_64-unknown-linux-gnu \
|
||||
; RUN: -filetype=obj %p/Inputs/dwarf5-df-dualcu-helper.ll -o=helper.o
|
||||
; RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-df-dualcu-main.s \
|
||||
; RUN: -split-dwarf-file=main.dwo -o main.o
|
||||
; RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-df-dualcu-helper.s \
|
||||
; RUN: -split-dwarf-file=helper.dwo -o helper.o
|
||||
; RUN: %clang %cflags -gdwarf-5 -gsplit-dwarf=split main.o helper.o -o main.exe
|
||||
; RUN: llvm-bolt main.exe -o main.exe.bolt --update-debug-sections
|
||||
; RUN: llvm-dwarfdump --show-form --verbose --debug-info main.exe | FileCheck -check-prefix=PRE-BOLT %s
|
||||
@@ -111,7 +111,6 @@
|
||||
; BOLT-DWO-MAIN-NEXT: DW_AT_frame_base [DW_FORM_exprloc] (DW_OP_reg6 RBP)
|
||||
; BOLT-DWO-MAIN-NEXT: DW_AT_name [DW_FORM_strx1] (indexed (00000005) string = "main")
|
||||
|
||||
|
||||
; PRE-BOLT-DWO-HELPER: version = 0x0005
|
||||
; PRE-BOLT-DWO-HELPER: DW_TAG_variable [2]
|
||||
; PRE-BOLT-DWO-HELPER-NEXT: DW_AT_name [DW_FORM_strx1] (indexed (00000000) string = "z")
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
; RUN: rm -rf %t
|
||||
; RUN: mkdir %t
|
||||
; RUN: cd %t
|
||||
; RUN: llc -split-dwarf-file=main.dwo -split-dwarf-output=main.dwo -O0 -mtriple=x86_64-unknown-linux-gnu \
|
||||
; RUN: -filetype=obj %p/Inputs/dwarf5-df-mono-main.ll -o=main.o
|
||||
; RUN: llc -O0 -mtriple=x86_64-unknown-linux-gnu -filetype=obj %p/Inputs/dwarf5-df-mono-helper.ll -o=helper.o
|
||||
; RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-df-mono-main.s \
|
||||
; RUN: -split-dwarf-file=main.dwo -o main.o
|
||||
; RUN: llvm-mc -filetype=obj -triple x86_64-unknown-linux-gnu %p/Inputs/dwarf5-df-mono-helper.s -o=helper.o
|
||||
; RUN: %clang %cflags -gdwarf-5 main.o helper.o -o main.exe
|
||||
; RUN: llvm-bolt main.exe -o main.exe.bolt --update-debug-sections
|
||||
; RUN: llvm-dwarfdump --show-form --verbose --debug-info main.exe | FileCheck -check-prefix=PRE-BOLT %s
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
; RUN: rm -rf %t
|
||||
; RUN: mkdir %t
|
||||
; RUN: cd %t
|
||||
; RUN: llc -split-dwarf-file=mainlocadddrx.dwo -split-dwarf-output=mainlocadddrx.dwo -O0 -mtriple=x86_64-unknown-linux-gnu -filetype=obj %s -o=mainlocadddrx.o
|
||||
; RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-locaddrx.s \
|
||||
; RUN: -split-dwarf-file=mainlocadddrx.dwo -o mainlocadddrx.o
|
||||
; RUN: %clang %cflags -gdwarf-5 -gsplit-dwarf=split mainlocadddrx.o -o mainlocadddrx.exe
|
||||
; RUN: llvm-bolt mainlocadddrx.exe -o mainlocadddrx.exe.bolt --update-debug-sections
|
||||
; RUN: llvm-dwarfdump --show-form --verbose --debug-info mainlocadddrx.exe | FileCheck -check-prefix=PRE-BOLT %s
|
||||
@@ -82,128 +83,3 @@
|
||||
; BOLT-DWO-NEXT: DW_AT_low_pc [DW_FORM_addrx] (indexed (00000003)
|
||||
; BOLT-DWO-NEXT: DW_AT_ranges [DW_FORM_rnglistx] (indexed (0x1) rangelist = 0x00000018
|
||||
; BOLT-DWO-NEXT: [0x0000000000000000, 0x0000000000000054))
|
||||
|
||||
; void use(int * x, int * y) {
|
||||
; *x += 4;
|
||||
; *y -= 2;
|
||||
; }
|
||||
;
|
||||
; int x = 0;
|
||||
; int y = 1;
|
||||
; int main(int argc, char *argv[]) {
|
||||
; x = argc;
|
||||
; y = argc + 3;
|
||||
; use(&x, &y);
|
||||
; return x + y;
|
||||
; }
|
||||
|
||||
; ModuleID = 'mainlocadddrx.cpp'
|
||||
source_filename = "mainlocadddrx.cpp"
|
||||
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
|
||||
target triple = "x86_64-unknown-linux-gnu"
|
||||
|
||||
@x = dso_local global i32 0, align 4, !dbg !0
|
||||
@y = dso_local global i32 1, align 4, !dbg !5
|
||||
|
||||
; Function Attrs: mustprogress noinline nounwind optnone uwtable
|
||||
define dso_local void @_Z3usePiS_(i32* noundef %x, i32* noundef %y) #0 !dbg !14 {
|
||||
entry:
|
||||
%x.addr = alloca i32*, align 8
|
||||
%y.addr = alloca i32*, align 8
|
||||
store i32* %x, i32** %x.addr, align 8
|
||||
call void @llvm.dbg.declare(metadata i32** %x.addr, metadata !19, metadata !DIExpression()), !dbg !20
|
||||
store i32* %y, i32** %y.addr, align 8
|
||||
call void @llvm.dbg.declare(metadata i32** %y.addr, metadata !21, metadata !DIExpression()), !dbg !22
|
||||
%0 = load i32*, i32** %x.addr, align 8, !dbg !23
|
||||
%1 = load i32, i32* %0, align 4, !dbg !24
|
||||
%add = add nsw i32 %1, 4, !dbg !24
|
||||
store i32 %add, i32* %0, align 4, !dbg !24
|
||||
%2 = load i32*, i32** %y.addr, align 8, !dbg !25
|
||||
%3 = load i32, i32* %2, align 4, !dbg !26
|
||||
%sub = sub nsw i32 %3, 2, !dbg !26
|
||||
store i32 %sub, i32* %2, align 4, !dbg !26
|
||||
ret void, !dbg !27
|
||||
}
|
||||
|
||||
; Function Attrs: nofree nosync nounwind readnone speculatable willreturn
|
||||
declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
|
||||
|
||||
; Function Attrs: mustprogress noinline norecurse nounwind optnone uwtable
|
||||
define dso_local noundef i32 @main(i32 noundef %argc, i8** noundef %argv) #2 !dbg !28 {
|
||||
entry:
|
||||
%retval = alloca i32, align 4
|
||||
%argc.addr = alloca i32, align 4
|
||||
%argv.addr = alloca i8**, align 8
|
||||
store i32 0, i32* %retval, align 4
|
||||
store i32 %argc, i32* %argc.addr, align 4
|
||||
call void @llvm.dbg.declare(metadata i32* %argc.addr, metadata !34, metadata !DIExpression()), !dbg !35
|
||||
store i8** %argv, i8*** %argv.addr, align 8
|
||||
call void @llvm.dbg.declare(metadata i8*** %argv.addr, metadata !36, metadata !DIExpression()), !dbg !37
|
||||
%0 = load i32, i32* %argc.addr, align 4, !dbg !38
|
||||
store i32 %0, i32* @x, align 4, !dbg !39
|
||||
%1 = load i32, i32* %argc.addr, align 4, !dbg !40
|
||||
%add = add nsw i32 %1, 3, !dbg !41
|
||||
store i32 %add, i32* @y, align 4, !dbg !42
|
||||
call void @_Z3usePiS_(i32* noundef @x, i32* noundef @y), !dbg !43
|
||||
%2 = load i32, i32* @x, align 4, !dbg !44
|
||||
%3 = load i32, i32* @y, align 4, !dbg !45
|
||||
%add1 = add nsw i32 %2, %3, !dbg !46
|
||||
ret i32 %add1, !dbg !47
|
||||
}
|
||||
|
||||
attributes #0 = { mustprogress noinline nounwind optnone uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
|
||||
attributes #1 = { nofree nosync nounwind readnone speculatable willreturn }
|
||||
attributes #2 = { mustprogress noinline norecurse nounwind optnone uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
|
||||
|
||||
!llvm.dbg.cu = !{!2}
|
||||
!llvm.module.flags = !{!8, !9, !10, !11, !12}
|
||||
!llvm.ident = !{!13}
|
||||
|
||||
!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
|
||||
!1 = distinct !DIGlobalVariable(name: "x", scope: !2, file: !3, line: 6, type: !7, isLocal: false, isDefinition: true)
|
||||
!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !3, producer: "clang version 15.0.0", isOptimized: false, runtimeVersion: 0, splitDebugFilename: "mainlocadddrx.dwo", emissionKind: FullDebug, globals: !4, splitDebugInlining: false, nameTableKind: GNU)
|
||||
!3 = !DIFile(filename: "mainlocadddrx.cpp", directory: ".", checksumkind: CSK_MD5, checksum: "d4fd79ce0087c4cefd089752bf2182c6")
|
||||
!4 = !{!0, !5}
|
||||
!5 = !DIGlobalVariableExpression(var: !6, expr: !DIExpression())
|
||||
!6 = distinct !DIGlobalVariable(name: "y", scope: !2, file: !3, line: 7, type: !7, isLocal: false, isDefinition: true)
|
||||
!7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
|
||||
!8 = !{i32 7, !"Dwarf Version", i32 5}
|
||||
!9 = !{i32 2, !"Debug Info Version", i32 3}
|
||||
!10 = !{i32 1, !"wchar_size", i32 4}
|
||||
!11 = !{i32 7, !"uwtable", i32 2}
|
||||
!12 = !{i32 7, !"frame-pointer", i32 2}
|
||||
!13 = !{!"clang version 15.0.0"}
|
||||
!14 = distinct !DISubprogram(name: "use", linkageName: "_Z3usePiS_", scope: !3, file: !3, line: 1, type: !15, scopeLine: 1, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !18)
|
||||
!15 = !DISubroutineType(types: !16)
|
||||
!16 = !{null, !17, !17}
|
||||
!17 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !7, size: 64)
|
||||
!18 = !{}
|
||||
!19 = !DILocalVariable(name: "x", arg: 1, scope: !14, file: !3, line: 1, type: !17)
|
||||
!20 = !DILocation(line: 1, column: 16, scope: !14)
|
||||
!21 = !DILocalVariable(name: "y", arg: 2, scope: !14, file: !3, line: 1, type: !17)
|
||||
!22 = !DILocation(line: 1, column: 25, scope: !14)
|
||||
!23 = !DILocation(line: 2, column: 2, scope: !14)
|
||||
!24 = !DILocation(line: 2, column: 4, scope: !14)
|
||||
!25 = !DILocation(line: 3, column: 2, scope: !14)
|
||||
!26 = !DILocation(line: 3, column: 4, scope: !14)
|
||||
!27 = !DILocation(line: 4, column: 1, scope: !14)
|
||||
!28 = distinct !DISubprogram(name: "main", scope: !3, file: !3, line: 8, type: !29, scopeLine: 8, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !18)
|
||||
!29 = !DISubroutineType(types: !30)
|
||||
!30 = !{!7, !7, !31}
|
||||
!31 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !32, size: 64)
|
||||
!32 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !33, size: 64)
|
||||
!33 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char)
|
||||
!34 = !DILocalVariable(name: "argc", arg: 1, scope: !28, file: !3, line: 8, type: !7)
|
||||
!35 = !DILocation(line: 8, column: 15, scope: !28)
|
||||
!36 = !DILocalVariable(name: "argv", arg: 2, scope: !28, file: !3, line: 8, type: !31)
|
||||
!37 = !DILocation(line: 8, column: 27, scope: !28)
|
||||
!38 = !DILocation(line: 9, column: 8, scope: !28)
|
||||
!39 = !DILocation(line: 9, column: 6, scope: !28)
|
||||
!40 = !DILocation(line: 10, column: 8, scope: !28)
|
||||
!41 = !DILocation(line: 10, column: 13, scope: !28)
|
||||
!42 = !DILocation(line: 10, column: 6, scope: !28)
|
||||
!43 = !DILocation(line: 11, column: 4, scope: !28)
|
||||
!44 = !DILocation(line: 12, column: 11, scope: !28)
|
||||
!45 = !DILocation(line: 12, column: 15, scope: !28)
|
||||
!46 = !DILocation(line: 12, column: 13, scope: !28)
|
||||
!47 = !DILocation(line: 12, column: 4, scope: !28)
|
||||
|
||||
Reference in New Issue
Block a user