File: 2010-06-01-DeadArg-DbgInfo.ll

package info (click to toggle)
llvm-toolchain-14 1%3A14.0.6-12
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,496,180 kB
  • sloc: cpp: 5,593,972; ansic: 986,872; asm: 585,869; python: 184,223; objc: 72,530; lisp: 31,119; f90: 27,793; javascript: 9,780; pascal: 9,762; sh: 9,482; perl: 7,468; ml: 5,432; awk: 3,523; makefile: 2,538; xml: 953; cs: 573; fortran: 567
file content (51 lines) | stat: -rw-r--r-- 2,914 bytes parent folder | download | duplicates (13)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
; RUN: llc -O2 < %s | FileCheck %s
; RUN: llc -O2 -regalloc=basic < %s | FileCheck %s
; Test to check that unused argument 'this' is not undefined in debug info.

target triple = "x86_64-apple-darwin10.2"

%struct.foo = type { i32 }

@llvm.used = appending global [1 x i8*] [i8* bitcast (i32 (%struct.foo*, i32)* @_ZN3foo3bazEi to i8*)], section "llvm.metadata"

; Function Attrs: noinline nounwind optsize readnone ssp
define i32 @_ZN3foo3bazEi(%struct.foo* nocapture %this, i32 %x) #0 align 2 !dbg !4 {
entry: 
  ; CHECK: DEBUG_VALUE: baz:this <- $rdi{{$}}
  tail call void @llvm.dbg.value(metadata %struct.foo* %this, i64 0, metadata !13, metadata !16), !dbg !17
  tail call void @llvm.dbg.value(metadata i32 %x, i64 0, metadata !18, metadata !16), !dbg !17
  %0 = mul nsw i32 %x, 7, !dbg !19
  %1 = add nsw i32 %0, 1, !dbg !19
  ret i32 %1, !dbg !19
}

; Function Attrs: nounwind readnone
declare void @llvm.dbg.value(metadata, i64, metadata, metadata) #1

attributes #0 = { noinline nounwind optsize readnone ssp }
attributes #1 = { nounwind readnone }

!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!3}

!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "4.2.1 LLVM build", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2)
!1 = !DIFile(filename: "foo.cp", directory: "/tmp/")
!2 = !{}
!3 = !{i32 1, !"Debug Info Version", i32 3}
!4 = distinct !DISubprogram(name: "baz", linkageName: "_ZN3foo3bazEi", scope: !5, file: !1, line: 15, type: !10, isLocal: false, isDefinition: true, scopeLine: 15, virtualIndex: 6, isOptimized: true, unit: !0)
!5 = !DICompositeType(tag: DW_TAG_structure_type, name: "foo", scope: !1, file: !1, line: 3, size: 32, align: 32, elements: !6)
!6 = !{!7, !9, !4}
!7 = !DIDerivedType(tag: DW_TAG_member, name: "y", scope: !5, file: !1, line: 8, baseType: !8, size: 32, align: 32)
!8 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
!9 = distinct !DISubprogram(name: "bar", linkageName: "_ZN3foo3barEi", scope: !5, file: !1, line: 11, type: !10, isLocal: false, isDefinition: true, scopeLine: 11, virtualIndex: 6, isOptimized: true, unit: !0)
!10 = !DISubroutineType(types: !11)
!11 = !{!8, !12, !8}
!12 = !DIDerivedType(tag: DW_TAG_pointer_type, scope: !1, file: !1, baseType: !5, size: 64, align: 64, flags: DIFlagArtificial)
!13 = !DILocalVariable(name: "this", arg: 1, scope: !4, file: !1, line: 15, type: !14)
!14 = !DIDerivedType(tag: DW_TAG_const_type, scope: !1, file: !1, baseType: !15, size: 64, align: 64, flags: DIFlagArtificial)
!15 = !DIDerivedType(tag: DW_TAG_pointer_type, scope: !1, file: !1, baseType: !5, size: 64, align: 64)
!16 = !DIExpression()
!17 = !DILocation(line: 0, scope: !4)
!18 = !DILocalVariable(name: "x", arg: 2, scope: !4, file: !1, line: 15, type: !8)
!19 = !DILocation(line: 16, scope: !20)
!20 = distinct !DILexicalBlock(scope: !4, file: !1, line: 15)