diff options
author | Reid Kleckner <rnk@google.com> | 2017-05-09 01:14:39 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2017-05-09 01:14:39 +0000 |
commit | 9f29914d4018c0c8ef2b7b7bceffb0d07483e89c (patch) | |
tree | 1bc28cf75b76a0ad46025a0ab5d9bedc36c4b57a /llvm/test/CodeGen/X86/dbg-baseptr.ll | |
parent | 42af6513589dbaf28b98a2d30d92cdd6a4884cc0 (diff) | |
download | bcm5719-llvm-9f29914d4018c0c8ef2b7b7bceffb0d07483e89c.tar.gz bcm5719-llvm-9f29914d4018c0c8ef2b7b7bceffb0d07483e89c.zip |
Revert "Use the frame index side table for byval and inalloca arguments"
This reverts r302483 and it's follow up fix.
llvm-svn: 302493
Diffstat (limited to 'llvm/test/CodeGen/X86/dbg-baseptr.ll')
-rw-r--r-- | llvm/test/CodeGen/X86/dbg-baseptr.ll | 62 |
1 files changed, 12 insertions, 50 deletions
diff --git a/llvm/test/CodeGen/X86/dbg-baseptr.ll b/llvm/test/CodeGen/X86/dbg-baseptr.ll index 893ca93a994..fb0da1b50d1 100644 --- a/llvm/test/CodeGen/X86/dbg-baseptr.ll +++ b/llvm/test/CodeGen/X86/dbg-baseptr.ll @@ -1,5 +1,4 @@ ; RUN: llc -o - %s | FileCheck %s -; RUN: llc -filetype=obj -o - %s | llvm-dwarfdump - | FileCheck %s --check-prefix=DWARF ; This test checks that parameters on the stack pointer are correctly ; referenced by debug info. target triple = "x86_64--" @@ -8,54 +7,24 @@ target triple = "x86_64--" @ptr = external global i32* %struct.s = type { i32, i32, i32, i32, i32 } -; Simple case: no FP, use offset from RSP. - ; CHECK-LABEL: f0: -; CHECK-NOT: pushq -; CHECK: movl $42, %eax -; CHECK: retq +; CHECK: DEBUG_VALUE: f:input <- [%RSP+8] define i32 @f0(%struct.s* byval align 8 %input) !dbg !8 { call void @llvm.dbg.declare(metadata %struct.s* %input, metadata !4, metadata !17), !dbg !18 - ret i32 42, !dbg !18 + ret i32 42 } -; DWARF-LABEL: .debug_info contents: - -; DWARF-LABEL: DW_TAG_subprogram -; DWARF: DW_AT_frame_base [DW_FORM_exprloc] (<0x1> 57 ) -; 0x57 -> RSP -; DWARF: DW_AT_name [DW_FORM_strp] ( {{.*}}"f0") -; DWARF: DW_TAG_formal_parameter -; DWARF-NEXT: DW_AT_location [DW_FORM_exprloc] (<0x2> 91 08 ) -; DW_OP_fbreg (0x91) 0x08 -; DWARF-NEXT: DW_AT_name [DW_FORM_strp] ( {{.*}}"input") - - -; Dynamic alloca forces the use of RBP as the base pointer - ; CHECK-LABEL: f1: -; CHECK: pushq %rbp -; CHECK: movl $42, %eax -; CHECK: popq %rbp -; CHECK: retq +; CHECK: DEBUG_VALUE: f:input <- [%RBP+16] define i32 @f1(%struct.s* byval align 8 %input) !dbg !19 { %val = load i64, i64* @glob ; this alloca should force FP usage. %stackspace = alloca i32, i64 %val, align 1 store i32* %stackspace, i32** @ptr call void @llvm.dbg.declare(metadata %struct.s* %input, metadata !20, metadata !17), !dbg !21 - ret i32 42, !dbg !21 + ret i32 42 } -; DWARF-LABEL: DW_TAG_subprogram -; DWARF: DW_AT_frame_base [DW_FORM_exprloc] (<0x1> 56 ) -; 0x56 -> RBP -; DWARF: DW_AT_name [DW_FORM_strp] ( {{.*}}"f1") -; DWARF: DW_TAG_formal_parameter -; DWARF-NEXT: DW_AT_location [DW_FORM_exprloc] (<0x2> 91 10 ) -; DW_OP_fbreg (0x91) 0x10 -; DWARF-NEXT: DW_AT_name [DW_FORM_strp] ( {{.*}}"input") - ; CHECK-LABEL: f2: ; Just check that we are indeed aligning the stack and setting up a base pointer ; in RBX. @@ -65,24 +34,17 @@ define i32 @f1(%struct.s* byval align 8 %input) !dbg !19 { ; CHECK: andq $-64, %rsp ; CHECK: subq $64, %rsp ; CHECK: movq %rsp, %rbx +; The parameter should still be referenced through RBP though. +; CHECK-NOT: DEBUG_VALUE: f:input <- [%RBX +; CHECK: DEBUG_VALUE: f:input <- [%RBP+16] define i32 @f2(%struct.s* byval align 8 %input) !dbg !22 { %val = load i64, i64* @glob %stackspace = alloca i32, i64 %val, align 64 store i32* %stackspace, i32** @ptr call void @llvm.dbg.declare(metadata %struct.s* %input, metadata !23, metadata !17), !dbg !24 - ret i32 42, !dbg !24 + ret i32 42 } -; "input" should still be referred to through RBP. -; DWARF-LABEL: DW_TAG_subprogram -; DWARF: DW_AT_frame_base [DW_FORM_exprloc] (<0x1> 56 ) -; 0x56 -> RBP -; DWARF: DW_AT_name [DW_FORM_strp] ( {{.*}}"f2") -; DWARF: DW_TAG_formal_parameter -; DWARF-NEXT: DW_AT_location [DW_FORM_exprloc] (<0x2> 91 10 ) -; DW_OP_fbreg (0x91) 0x10 -; DWARF-NEXT: DW_AT_name [DW_FORM_strp] ( {{.*}}"input") - declare void @llvm.dbg.declare(metadata, metadata, metadata) !llvm.dbg.cu = !{!2} @@ -90,7 +52,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) !0 = !{i32 2, !"Dwarf Version", i32 4} !1 = !{i32 2, !"Debug Info Version", i32 3} -!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, emissionKind: FullDebug) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3) !3 = !DIFile(filename: "dbg-baseptr.ll", directory: "/") !4 = !DILocalVariable(name: "input", arg: 1, scope: !8, file: !3, line: 5, type: !9) !5 = !{} @@ -98,7 +60,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) !6 = !DISubroutineType(types: !7) !7 = !{!10, !9} -!8 = distinct !DISubprogram(name: "f0", file: !3, line: 5, type: !6, isLocal: false, isDefinition: true, unit: !2, variables: !5) +!8 = distinct !DISubprogram(name: "f", file: !3, line: 5, type: !6, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, unit: !2, variables: !5) !9 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "s", elements: !11) !10 = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned) @@ -112,9 +74,9 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) !17 = !DIExpression() !18 = !DILocation(line: 5, scope: !8) -!19 = distinct !DISubprogram(name: "f1", file: !3, line: 5, type: !6, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, unit: !2, variables: !5) +!19 = distinct !DISubprogram(name: "f", file: !3, line: 5, type: !6, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, unit: !2, variables: !5) !20 = !DILocalVariable(name: "input", arg: 1, scope: !19, file: !3, line: 5, type: !9) !21 = !DILocation(line: 5, scope: !19) -!22 = distinct !DISubprogram(name: "f2", file: !3, line: 5, type: !6, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, unit: !2, variables: !5) +!22 = distinct !DISubprogram(name: "f", file: !3, line: 5, type: !6, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, unit: !2, variables: !5) !23 = !DILocalVariable(name: "input", arg: 1, scope: !22, file: !3, line: 5, type: !9) !24 = !DILocation(line: 5, scope: !22) |