Debian Codegraph @

llvm/test/Transforms/SampleProfile/pseudo-probe-no-debug-info.ll

raw
1 ; RUN: opt < %s -passes='pseudo-probe,cgscc(inline)' -S | FileCheck %s
2
3 ; CHECK-LABEL: @caller(
4
5 ; This instruction did not have a !dbg metadata in the callee but get a !dbg after inlined.
6 ; CHECK: store i32 1, {{.*}}, !dbg ![[#]]
7
8 ; This pseudo probe came from callee without a !dbg metadata.
9 ; CHECK-NOT: call void @llvm.pseudoprobe({{.*}}), !dbg ![[#]]
10 ; CHECK: call void @llvm.pseudoprobe({{.*}})
11
12 @a = common global i32 0, align 4
13 @b = common global i32 0, align 4
14
15 ; Function Attrs: nounwind uwtable
16 define void @callee() {
17 entry:
18 store i32 1, ptr @a, align 4
19 ret void
20 }
21
22 ; Function Attrs: nounwind uwtable
23 define void @caller() !dbg !4 {
24 entry:
25 tail call void @callee(), !dbg !12
26 ret void, !dbg !12
27 }
28
29 !llvm.dbg.cu = !{!0}
30 !llvm.module.flags = !{!8, !9}
31 !llvm.ident = !{!10}
32
33 !0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 (210174)", isOptimized: true, emissionKind: LineTablesOnly, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2)
34 !1 = !DIFile(filename: "test.c", directory: "/code/llvm/build0")
35 !2 = !{}
36 !4 = distinct !DISubprogram(name: "caller", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !0, scopeLine: 4, file: !1, scope: !5, type: !6, retainedNodes: !2)
37 !5 = !DIFile(filename: "test.c", directory: "/code/llvm/build0")
38 !6 = !DISubroutineType(types: !2)
39 !7 = distinct !DISubprogram(name: "callee2", line: 2, isLocal: true, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !0, scopeLine: 2, file: !1, scope: !5, type: !6, retainedNodes: !2)
40 !8 = !{i32 2, !"Dwarf Version", i32 4}
41 !9 = !{i32 2, !"Debug Info Version", i32 3}
42 !10 = !{!"clang version 3.5.0 (210174)"}
43 !11 = !DILocation(line: 2, scope: !7)
44 !12 = !DILocation(line: 4, scope: !4)