[llvm] [BPF] Record an argument's first DBG_VALUE as its entry location (PR #217991)

via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 21 13:49:15 PDT 2026


https://github.com/yonghong-song updated https://github.com/llvm/llvm-project/pull/217991

>From 675e37a4c2259572cec7189aaf8036986e79abb7 Mon Sep 17 00:00:00 2001
From: Yonghong Song <yonghong.song at linux.dev>
Date: Wed, 19 Aug 2026 22:00:51 -0700
Subject: [PATCH] [BPF] Record an argument's first DBG_VALUE as its entry
 location

Accurate BTF types for DW_CC_nocall functions were added in [1] and work
at -O2. At -O1 the entry block keeps debug locations that -O2 optimizes
away, and two of those patterns defeat the argument-register scan.
Accurate signatures are worth having at -O1 too: transformations move
between optimization levels over time, and some users build at -O1.

collectNocallEntryArgRegs() scans the entry block for DBG_VALUEs to find
which physical register each source argument arrived in. An argument may
have several DBG_VALUEs there, and the map was last-write-wins, so a
later location silently replaced the entry one. The registers then no
longer match the optimized IR signature, canUseNocallOptimizedSignature()
bails, and BTFDebug emits the unfiltered source prototype -- a FUNC_PROTO
that does not describe the real ABI.

The first pattern is a spilled argument. From
progs/test_l4lb_noinline_dynptr.c in the kernel BPF selftests, with the
stack stores elided:

  bb.0 (%ir-block.4):
    liveins: $r1, $r2, $r4, $w3
    DBG_VALUE $w3, $noreg, !"is_ipv6",
              !DIExpression(DW_OP_LLVM_convert, 1, DW_ATE_unsigned,
                            DW_OP_LLVM_convert, 8, DW_ATE_unsigned,
                            DW_OP_stack_value)
    ...
    STW32 $w3, $r10, -184
    DBG_VALUE $r10, $noreg, !"is_ipv6",
              !DIExpression(DW_OP_constu, 184, DW_OP_minus,
                            DW_OP_deref_size, 4, DW_OP_LLVM_convert, 1,
                            DW_ATE_unsigned, DW_OP_LLVM_convert, 8,
                            DW_ATE_unsigned, DW_OP_stack_value)
    JEQ_ri_32 killed $w3, 0, %bb.9

"is_ipv6" arrives in $w3 and is spilled, after which the register
allocator emits a second DBG_VALUE for the spill slot. It is not indirect
-- the offset operand is $noreg, not an immediate -- so
isIndirectDebugValue() does not reject it, and $r10 is the frame pointer,
never redefined in the entry block, so the DefinedRegs check does not
either. It replaced $w3 with $r10 and the DWARF register order check then
failed.

The second pattern is an argument reassigned from another argument:

  bb.0 (%ir-block.5):
    liveins: $r1, $r2, $r3, $r4, $r5
    DBG_VALUE $r1, $noreg, !"a", !DIExpression()
    ...
    DBG_VALUE $r5, $noreg, !"e", !DIExpression()
    $r1 = nsw MUL_ri killed $r1(tied-def 0), 3
    DBG_VALUE $r5, $noreg, !"a", !DIExpression()

The last DBG_VALUE describes "a" after an assignment "a = e". Entry
locations are keyed by source argument number, so it overwrote "a"'s
entry location $r1 with $r5. $r5 is a live-in the entry block never
redefines, so DefinedRegs does not reject it here either.

Fix by recording the first eligible DBG_VALUE for each argument instead
of the last: at function entry an argument still sits in its ABI-assigned
register, and any later DBG_VALUE describes where it moved to.

  [1] https://github.com/llvm/llvm-project/pull/198426
---
 llvm/lib/Target/BPF/BTFDebug.cpp              |   5 +-
 .../BPF/BTF/func-nocall-reassigned-arg.ll     | 121 ++++++++++
 .../BPF/BTF/func-nocall-spilled-arg.ll        | 215 ++++++++++++++++++
 3 files changed, 339 insertions(+), 2 deletions(-)
 create mode 100644 llvm/test/CodeGen/BPF/BTF/func-nocall-reassigned-arg.ll
 create mode 100644 llvm/test/CodeGen/BPF/BTF/func-nocall-spilled-arg.ll

diff --git a/llvm/lib/Target/BPF/BTFDebug.cpp b/llvm/lib/Target/BPF/BTFDebug.cpp
index 6de1d1eee7cc4..7ddeedb838e87 100644
--- a/llvm/lib/Target/BPF/BTFDebug.cpp
+++ b/llvm/lib/Target/BPF/BTFDebug.cpp
@@ -111,7 +111,8 @@ static bool sourceArgMatchesIRType(const DIType *SourceTy, Type *IRTy) {
 /// when its register either (a) has not been redefined by any preceding
 /// non-debug instruction (i.e. it still holds the caller-passed value), or
 /// (b) was most recently loaded from the stack via $r11 (a stack-passed
-/// argument beyond the first five register args).
+/// argument beyond the first five register args). For each argument only the
+/// first eligible DBG_VALUE is recorded, since that is its entry location.
 ///
 /// There is another case where DBG_VALUE is not emitted due to
 /// AssignmentTrackingAnalysis which determines that a variable is
@@ -157,7 +158,7 @@ collectNocallEntryArgRegs(const MachineFunction &MF) {
 
       if (!DefinedRegs.contains(MO.getReg()) ||
           StackLoadRegs.contains(MO.getReg()))
-        EntryRegMap[Arg] = MO.getReg();
+        EntryRegMap.try_emplace(Arg, MO.getReg());
       continue;
     }
 
diff --git a/llvm/test/CodeGen/BPF/BTF/func-nocall-reassigned-arg.ll b/llvm/test/CodeGen/BPF/BTF/func-nocall-reassigned-arg.ll
new file mode 100644
index 0000000000000..ad548e23b63d5
--- /dev/null
+++ b/llvm/test/CodeGen/BPF/BTF/func-nocall-reassigned-arg.ll
@@ -0,0 +1,121 @@
+; RUN: llc -mtriple=bpfel -mcpu=v3 -filetype=obj -o %t1 %s
+; RUN: llvm-objcopy --dump-section='.BTF'=%t2 %t1
+; RUN: %python %p/print_btf.py %t2 | FileCheck -check-prefixes=CHECK %s
+
+; 'a' must be associated with $r1, its entry location, not $r5.
+;
+;   DBG_VALUE $r1, $noreg, !"a", !DIExpression()   ; entry location
+;   ...
+;   DBG_VALUE $r5, $noreg, !"e", !DIExpression()
+;   $r1 = nsw MUL_ri killed $r1, 3
+;   DBG_VALUE $r5, $noreg, !"a", !DIExpression()   ; 'a' now holds 'e'
+;
+; Generated with: clang -g -O1 --target=bpfel -mcpu=v3 -c t3.c
+;
+;   extern void sink(long);
+;
+;   __attribute__((noinline)) static long
+;   f3(long unused, long a, long b, long c, long d, long e)
+;   {
+;   	long t = a * 3;
+;
+;   	a = e;
+;   	sink(t + a + b + c + d);
+;   	return t;
+;   }
+;
+;   void caller(long x) { f3(x, x+1, x+2, x+3, x+4, x+5); }
+;
+; 'unused' is removed by DeadArgumentElimination, hence vlen=5 below.
+
+; CHECK:      [1] INT 'long' size=8 bits_offset=0 nr_bits=64 encoding=SIGNED
+; CHECK-NEXT: [2] FUNC_PROTO '(anon)' ret_type_id=0 vlen=5
+; CHECK-NEXT: 	'a' type_id=1
+; CHECK-NEXT: 	'b' type_id=1
+; CHECK-NEXT: 	'c' type_id=1
+; CHECK-NEXT: 	'd' type_id=1
+; CHECK-NEXT: 	'e' type_id=1
+; CHECK-NEXT: [3] FUNC 'f3' type_id=2 linkage=static
+
+target datalayout = "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128"
+target triple = "bpfel"
+
+; Function Attrs: noinline nounwind
+define internal fastcc void @f3(i64 noundef range(i64 -9223372036854775807, -9223372036854775808) %0, i64 noundef range(i64 -9223372036854775806, -9223372036854775808) %1, i64 noundef range(i64 -9223372036854775805, -9223372036854775808) %2, i64 noundef range(i64 -9223372036854775804, -9223372036854775808) %3, i64 noundef range(i64 -9223372036854775803, -9223372036854775808) %4) unnamed_addr #1 !dbg !26 {
+    #dbg_value(i64 poison, !30, !DIExpression(), !37)
+    #dbg_value(i64 %0, !31, !DIExpression(), !37)
+    #dbg_value(i64 %1, !32, !DIExpression(), !37)
+    #dbg_value(i64 %2, !33, !DIExpression(), !37)
+    #dbg_value(i64 %3, !34, !DIExpression(), !37)
+    #dbg_value(i64 %4, !35, !DIExpression(), !37)
+  %6 = mul nsw i64 %0, 3, !dbg !38
+    #dbg_value(i64 %6, !36, !DIExpression(), !37)
+    #dbg_value(i64 %4, !31, !DIExpression(), !37)
+  %7 = add i64 %1, %6, !dbg !39
+  %8 = add i64 %7, %2, !dbg !40
+  %9 = add i64 %8, %3, !dbg !41
+  %10 = add i64 %9, %4, !dbg !42
+  tail call void @sink(i64 noundef %10) #3, !dbg !43
+  ret void, !dbg !44
+}
+
+declare !dbg !45 dso_local void @sink(i64 noundef) local_unnamed_addr #2
+
+attributes #0 = { nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="v3" }
+attributes #1 = { noinline nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="v3" }
+attributes #2 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="v3" }
+attributes #3 = { nounwind }
+
+!llvm.dbg.cu = !{!0}
+!llvm.module.flags = !{!2, !3, !4, !5}
+!llvm.ident = !{!6}
+!llvm.errno.tbaa = !{!7}
+
+!0 = distinct !DICompileUnit(language: DW_LANG_C11, file: !1, producer: "clang version 24.0.0git (git at github.com:yonghong-song/llvm-project.git ec2a7ae3b52108d0c7f9a3e51952bb0c360bb01b)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None)
+!1 = !DIFile(filename: "t3.c", directory: "/tmp/tc", checksumkind: CSK_MD5, checksum: "a18fcbf323bfda80506753821b5d7ffe")
+!2 = !{i32 7, !"Dwarf Version", i32 5}
+!3 = !{i32 2, !"Debug Info Version", i32 3}
+!4 = !{i32 7, !"frame-pointer", i32 2}
+!5 = !{i32 7, !"debug-info-assignment-tracking", i1 true}
+!6 = !{!"clang version 24.0.0git (git at github.com:yonghong-song/llvm-project.git ec2a7ae3b52108d0c7f9a3e51952bb0c360bb01b)"}
+!7 = !{!8, !9, i64 0}
+!8 = !{!"__libc_errno", !9, i64 0}
+!9 = !{!"int", !10, i64 0}
+!10 = !{!"omnipotent char", !11, i64 0}
+!11 = !{!"Simple C/C++ TBAA"}
+!12 = distinct !DISubprogram(name: "caller", scope: !1, file: !1, line: 13, type: !13, scopeLine: 13, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !16, keyInstructions: true)
+!13 = !DISubroutineType(types: !14)
+!14 = !{null, !15}
+!15 = !DIBasicType(name: "long", size: 64, encoding: DW_ATE_signed)
+!16 = !{!17}
+!17 = !DILocalVariable(name: "x", arg: 1, scope: !12, file: !1, line: 13, type: !15)
+!18 = !DILocation(line: 0, scope: !12)
+!19 = !DILocation(line: 13, column: 30, scope: !12)
+!20 = !DILocation(line: 13, column: 35, scope: !12)
+!21 = !DILocation(line: 13, column: 40, scope: !12)
+!22 = !DILocation(line: 13, column: 45, scope: !12)
+!23 = !DILocation(line: 13, column: 50, scope: !12)
+!24 = !DILocation(line: 13, column: 23, scope: !12)
+!25 = !DILocation(line: 13, column: 55, scope: !12, atomGroup: 1, atomRank: 1)
+!26 = distinct !DISubprogram(name: "f3", scope: !1, file: !1, line: 4, type: !27, scopeLine: 5, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !29, keyInstructions: true)
+!27 = !DISubroutineType(cc: DW_CC_nocall, types: !28)
+!28 = !{!15, !15, !15, !15, !15, !15, !15}
+!29 = !{!30, !31, !32, !33, !34, !35, !36}
+!30 = !DILocalVariable(name: "unused", arg: 1, scope: !26, file: !1, line: 4, type: !15)
+!31 = !DILocalVariable(name: "a", arg: 2, scope: !26, file: !1, line: 4, type: !15)
+!32 = !DILocalVariable(name: "b", arg: 3, scope: !26, file: !1, line: 4, type: !15)
+!33 = !DILocalVariable(name: "c", arg: 4, scope: !26, file: !1, line: 4, type: !15)
+!34 = !DILocalVariable(name: "d", arg: 5, scope: !26, file: !1, line: 4, type: !15)
+!35 = !DILocalVariable(name: "e", arg: 6, scope: !26, file: !1, line: 4, type: !15)
+!36 = !DILocalVariable(name: "t", scope: !26, file: !1, line: 6, type: !15)
+!37 = !DILocation(line: 0, scope: !26)
+!38 = !DILocation(line: 6, column: 13, scope: !26, atomGroup: 1, atomRank: 2)
+!39 = !DILocation(line: 9, column: 9, scope: !26)
+!40 = !DILocation(line: 9, column: 13, scope: !26)
+!41 = !DILocation(line: 9, column: 17, scope: !26)
+!42 = !DILocation(line: 9, column: 21, scope: !26)
+!43 = !DILocation(line: 9, column: 2, scope: !26)
+!44 = !DILocation(line: 10, column: 2, scope: !26, atomGroup: 4, atomRank: 1)
+!45 = !DISubprogram(name: "sink", scope: !1, file: !1, line: 1, type: !13, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized, retainedNodes: !46)
+!46 = !{!47}
+!47 = !DILocalVariable(arg: 1, scope: !45, file: !1, line: 1, type: !15)
diff --git a/llvm/test/CodeGen/BPF/BTF/func-nocall-spilled-arg.ll b/llvm/test/CodeGen/BPF/BTF/func-nocall-spilled-arg.ll
new file mode 100644
index 0000000000000..333da16b6b015
--- /dev/null
+++ b/llvm/test/CodeGen/BPF/BTF/func-nocall-spilled-arg.ll
@@ -0,0 +1,215 @@
+; RUN: llc -mtriple=bpfel -mcpu=v3 -filetype=obj -o %t1 %s
+; RUN: llvm-objcopy --dump-section='.BTF'=%t2 %t1
+; RUN: %python %p/print_btf.py %t2 | FileCheck -check-prefixes=CHECK %s
+
+; 'b' must be associated with $w3, its entry location, not $r10.
+;
+;   DBG_VALUE $w3, $noreg, !"b", !DIExpression(DW_OP_LLVM_convert, ...)
+;   ...
+;   STW32 $w3, $r10, -16
+;   DBG_VALUE $r10, $noreg, !"b",
+;             !DIExpression(DW_OP_constu, 16, DW_OP_minus,
+;                           DW_OP_deref_size, 4, ..., DW_OP_stack_value)
+;
+; Generated with: clang -g -O1 --target=bpfel -mcpu=v3 -c t1b.c
+;
+;   extern void sink(long);
+;   extern volatile long vsrc;
+;
+;   __attribute__((noinline)) static long
+;   f1(long *p, long *q, long unused, _Bool b, long *r)
+;   {
+;   	long u0 = vsrc, u1 = vsrc, u2 = vsrc, u3 = vsrc;
+;   	long u4 = vsrc, u5 = vsrc, u6 = vsrc, u7 = vsrc;
+;   	long s = u0 + u1 + u2 + u3 + u4 + u5 + u6 + u7;
+;
+;   	if (b)
+;   		sink(s + (long)p);
+;   	else
+;   		sink(s + (long)q);
+;
+;   	sink(u0 * u1 + u2 * u3);
+;   	sink(u4 * u5 + u6 * u7 + (long)r);
+;   	if (b)
+;   		sink(u0 - u7);
+;   	return s;
+;   }
+;
+;   void caller(long *p, long *q, long z, _Bool b, long *r) { f1(p, q, z, b, r); }
+;
+; 'unused' is dropped by DeadArgumentElimination, which also voids the return
+; value and so marks the subprogram DW_CC_nocall.  The caller is omitted.
+
+; CHECK:      [1] PTR '(anon)' type_id=2
+; CHECK-NEXT: [2] INT 'long' size=8 bits_offset=0 nr_bits=64 encoding=SIGNED
+; CHECK-NEXT: [3] INT '_Bool' size=1 bits_offset=0 nr_bits=8 encoding=BOOL
+; CHECK-NEXT: [4] FUNC_PROTO '(anon)' ret_type_id=0 vlen=4
+; CHECK-NEXT: 	'p' type_id=1
+; CHECK-NEXT: 	'q' type_id=1
+; CHECK-NEXT: 	'b' type_id=3
+; CHECK-NEXT: 	'r' type_id=1
+; CHECK-NEXT: [5] FUNC 'f1' type_id=4 linkage=static
+
+target datalayout = "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128"
+target triple = "bpfel"
+
+ at vsrc = external dso_local global i64, align 8, !dbg !0
+
+; Function Attrs: noinline nounwind
+define internal fastcc void @f1(ptr noundef %0, ptr noundef %1, i1 noundef zeroext %2, ptr noundef %3) unnamed_addr #1 !dbg !32 {
+    #dbg_value(ptr %0, !36, !DIExpression(), !50)
+    #dbg_value(ptr %1, !37, !DIExpression(), !50)
+    #dbg_value(i64 poison, !38, !DIExpression(), !50)
+    #dbg_value(i1 %2, !39, !DIExpression(DW_OP_LLVM_convert, 1, DW_ATE_unsigned, DW_OP_LLVM_convert, 8, DW_ATE_unsigned, DW_OP_stack_value), !50)
+    #dbg_value(ptr %3, !40, !DIExpression(), !50)
+  %5 = load volatile i64, ptr @vsrc, align 8, !dbg !51, !tbaa !52
+    #dbg_value(i64 %5, !41, !DIExpression(), !50)
+  %6 = load volatile i64, ptr @vsrc, align 8, !dbg !54, !tbaa !52
+    #dbg_value(i64 %6, !42, !DIExpression(), !50)
+  %7 = load volatile i64, ptr @vsrc, align 8, !dbg !55, !tbaa !52
+    #dbg_value(i64 %7, !43, !DIExpression(), !50)
+  %8 = load volatile i64, ptr @vsrc, align 8, !dbg !56, !tbaa !52
+    #dbg_value(i64 %8, !44, !DIExpression(), !50)
+  %9 = load volatile i64, ptr @vsrc, align 8, !dbg !57, !tbaa !52
+    #dbg_value(i64 %9, !45, !DIExpression(), !50)
+  %10 = load volatile i64, ptr @vsrc, align 8, !dbg !58, !tbaa !52
+    #dbg_value(i64 %10, !46, !DIExpression(), !50)
+  %11 = load volatile i64, ptr @vsrc, align 8, !dbg !59, !tbaa !52
+    #dbg_value(i64 %11, !47, !DIExpression(), !50)
+  %12 = load volatile i64, ptr @vsrc, align 8, !dbg !60, !tbaa !52
+    #dbg_value(i64 %12, !48, !DIExpression(), !50)
+  %13 = add nsw i64 %6, %5, !dbg !61
+  %14 = add nsw i64 %13, %7, !dbg !62
+  %15 = add nsw i64 %14, %8, !dbg !63
+  %16 = add nsw i64 %15, %9, !dbg !64
+  %17 = add nsw i64 %16, %10, !dbg !65
+  %18 = add nsw i64 %17, %11, !dbg !66
+  %19 = add nsw i64 %18, %12, !dbg !67
+    #dbg_value(i64 %19, !49, !DIExpression(), !50)
+  %20 = select i1 %2, ptr %0, ptr %1
+  %21 = ptrtoint ptr %20 to i64, !dbg !68
+  %22 = add nsw i64 %19, %21, !dbg !68
+  tail call void @sink(i64 noundef %22) #3, !dbg !68
+  %23 = mul nsw i64 %6, %5, !dbg !70
+  %24 = mul nsw i64 %8, %7, !dbg !71
+  %25 = add nsw i64 %24, %23, !dbg !72
+  tail call void @sink(i64 noundef %25) #3, !dbg !73
+  %26 = mul nsw i64 %10, %9, !dbg !74
+  %27 = mul nsw i64 %12, %11, !dbg !75
+  %28 = ptrtoint ptr %3 to i64, !dbg !76
+  %29 = add i64 %26, %28, !dbg !77
+  %30 = add i64 %29, %27, !dbg !78
+  tail call void @sink(i64 noundef %30) #3, !dbg !79
+  br i1 %2, label %31, label %33, !dbg !80
+
+31:                                               ; preds = %4
+  %32 = sub nsw i64 %5, %12, !dbg !82
+  tail call void @sink(i64 noundef %32) #3, !dbg !83
+  br label %33, !dbg !83
+
+33:                                               ; preds = %31, %4
+  ret void, !dbg !84
+}
+
+declare !dbg !85 dso_local void @sink(i64 noundef) local_unnamed_addr #2
+
+attributes #0 = { nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="v3" }
+attributes #1 = { noinline nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="v3" }
+attributes #2 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="v3" }
+attributes #3 = { nounwind }
+
+!llvm.dbg.cu = !{!2}
+!llvm.module.flags = !{!8, !9, !10, !11}
+!llvm.ident = !{!12}
+!llvm.errno.tbaa = !{!13}
+
+!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
+!1 = distinct !DIGlobalVariable(name: "vsrc", scope: !2, file: !3, line: 2, type: !7, isLocal: false, isDefinition: false)
+!2 = distinct !DICompileUnit(language: DW_LANG_C11, file: !3, producer: "clang version 24.0.0git (git at github.com:yonghong-song/llvm-project.git ec2a7ae3b52108d0c7f9a3e51952bb0c360bb01b)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, retainedTypes: !4, globals: !6, splitDebugInlining: false, nameTableKind: None)
+!3 = !DIFile(filename: "t1b.c", directory: "/tmp/tc", checksumkind: CSK_MD5, checksum: "305f1100f52881180bfc07cab84b6633")
+!4 = !{!5}
+!5 = !DIBasicType(name: "long", size: 64, encoding: DW_ATE_signed)
+!6 = !{!0}
+!7 = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: !5)
+!8 = !{i32 7, !"Dwarf Version", i32 5}
+!9 = !{i32 2, !"Debug Info Version", i32 3}
+!10 = !{i32 7, !"frame-pointer", i32 2}
+!11 = !{i32 7, !"debug-info-assignment-tracking", i1 true}
+!12 = !{!"clang version 24.0.0git (git at github.com:yonghong-song/llvm-project.git ec2a7ae3b52108d0c7f9a3e51952bb0c360bb01b)"}
+!13 = !{!14, !15, i64 0}
+!14 = !{!"__libc_errno", !15, i64 0}
+!15 = !{!"int", !16, i64 0}
+!16 = !{!"omnipotent char", !17, i64 0}
+!17 = !{!"Simple C/C++ TBAA"}
+!18 = distinct !DISubprogram(name: "caller", scope: !3, file: !3, line: 23, type: !19, scopeLine: 23, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !2, retainedNodes: !23, keyInstructions: true)
+!19 = !DISubroutineType(types: !20)
+!20 = !{null, !21, !21, !5, !22, !21}
+!21 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !5, size: 64)
+!22 = !DIBasicType(name: "_Bool", size: 8, encoding: DW_ATE_boolean)
+!23 = !{!24, !25, !26, !27, !28}
+!24 = !DILocalVariable(name: "p", arg: 1, scope: !18, file: !3, line: 23, type: !21)
+!25 = !DILocalVariable(name: "q", arg: 2, scope: !18, file: !3, line: 23, type: !21)
+!26 = !DILocalVariable(name: "z", arg: 3, scope: !18, file: !3, line: 23, type: !5)
+!27 = !DILocalVariable(name: "b", arg: 4, scope: !18, file: !3, line: 23, type: !22)
+!28 = !DILocalVariable(name: "r", arg: 5, scope: !18, file: !3, line: 23, type: !21)
+!29 = !DILocation(line: 0, scope: !18)
+!30 = !DILocation(line: 23, column: 59, scope: !18)
+!31 = !DILocation(line: 23, column: 78, scope: !18, atomGroup: 1, atomRank: 1)
+!32 = distinct !DISubprogram(name: "f1", scope: !3, file: !3, line: 5, type: !33, scopeLine: 6, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition | DISPFlagOptimized, unit: !2, retainedNodes: !35, keyInstructions: true)
+!33 = !DISubroutineType(cc: DW_CC_nocall, types: !34)
+!34 = !{!5, !21, !21, !5, !22, !21}
+!35 = !{!36, !37, !38, !39, !40, !41, !42, !43, !44, !45, !46, !47, !48, !49}
+!36 = !DILocalVariable(name: "p", arg: 1, scope: !32, file: !3, line: 5, type: !21)
+!37 = !DILocalVariable(name: "q", arg: 2, scope: !32, file: !3, line: 5, type: !21)
+!38 = !DILocalVariable(name: "unused", arg: 3, scope: !32, file: !3, line: 5, type: !5)
+!39 = !DILocalVariable(name: "b", arg: 4, scope: !32, file: !3, line: 5, type: !22)
+!40 = !DILocalVariable(name: "r", arg: 5, scope: !32, file: !3, line: 5, type: !21)
+!41 = !DILocalVariable(name: "u0", scope: !32, file: !3, line: 7, type: !5)
+!42 = !DILocalVariable(name: "u1", scope: !32, file: !3, line: 7, type: !5)
+!43 = !DILocalVariable(name: "u2", scope: !32, file: !3, line: 7, type: !5)
+!44 = !DILocalVariable(name: "u3", scope: !32, file: !3, line: 7, type: !5)
+!45 = !DILocalVariable(name: "u4", scope: !32, file: !3, line: 8, type: !5)
+!46 = !DILocalVariable(name: "u5", scope: !32, file: !3, line: 8, type: !5)
+!47 = !DILocalVariable(name: "u6", scope: !32, file: !3, line: 8, type: !5)
+!48 = !DILocalVariable(name: "u7", scope: !32, file: !3, line: 8, type: !5)
+!49 = !DILocalVariable(name: "s", scope: !32, file: !3, line: 9, type: !5)
+!50 = !DILocation(line: 0, scope: !32)
+!51 = !DILocation(line: 7, column: 12, scope: !32, atomGroup: 1, atomRank: 2)
+!52 = !{!53, !53, i64 0}
+!53 = !{!"long", !16, i64 0}
+!54 = !DILocation(line: 7, column: 23, scope: !32, atomGroup: 2, atomRank: 2)
+!55 = !DILocation(line: 7, column: 34, scope: !32, atomGroup: 3, atomRank: 2)
+!56 = !DILocation(line: 7, column: 45, scope: !32, atomGroup: 4, atomRank: 2)
+!57 = !DILocation(line: 8, column: 12, scope: !32, atomGroup: 5, atomRank: 2)
+!58 = !DILocation(line: 8, column: 23, scope: !32, atomGroup: 6, atomRank: 2)
+!59 = !DILocation(line: 8, column: 34, scope: !32, atomGroup: 7, atomRank: 2)
+!60 = !DILocation(line: 8, column: 45, scope: !32, atomGroup: 8, atomRank: 2)
+!61 = !DILocation(line: 9, column: 14, scope: !32)
+!62 = !DILocation(line: 9, column: 19, scope: !32)
+!63 = !DILocation(line: 9, column: 24, scope: !32)
+!64 = !DILocation(line: 9, column: 29, scope: !32)
+!65 = !DILocation(line: 9, column: 34, scope: !32)
+!66 = !DILocation(line: 9, column: 39, scope: !32)
+!67 = !DILocation(line: 9, column: 44, scope: !32, atomGroup: 9, atomRank: 2)
+!68 = !DILocation(line: 0, scope: !69)
+!69 = distinct !DILexicalBlock(scope: !32, file: !3, line: 11, column: 6)
+!70 = !DILocation(line: 16, column: 10, scope: !32)
+!71 = !DILocation(line: 16, column: 20, scope: !32)
+!72 = !DILocation(line: 16, column: 15, scope: !32)
+!73 = !DILocation(line: 16, column: 2, scope: !32)
+!74 = !DILocation(line: 17, column: 10, scope: !32)
+!75 = !DILocation(line: 17, column: 20, scope: !32)
+!76 = !DILocation(line: 17, column: 27, scope: !32)
+!77 = !DILocation(line: 17, column: 15, scope: !32)
+!78 = !DILocation(line: 17, column: 25, scope: !32)
+!79 = !DILocation(line: 17, column: 2, scope: !32)
+!80 = !DILocation(line: 18, column: 6, scope: !81, atomGroup: 11, atomRank: 1)
+!81 = distinct !DILexicalBlock(scope: !32, file: !3, line: 18, column: 6)
+!82 = !DILocation(line: 19, column: 11, scope: !81)
+!83 = !DILocation(line: 19, column: 3, scope: !81)
+!84 = !DILocation(line: 20, column: 2, scope: !32, atomGroup: 13, atomRank: 1)
+!85 = !DISubprogram(name: "sink", scope: !3, file: !3, line: 1, type: !86, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized, retainedNodes: !88)
+!86 = !DISubroutineType(types: !87)
+!87 = !{null, !5}
+!88 = !{!89}
+!89 = !DILocalVariable(arg: 1, scope: !85, file: !3, line: 1, type: !5)



More information about the llvm-commits mailing list