aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYingchi Long <i@lyc.dev>2024-07-04 06:13:18 +0800
committerYingchi Long <i@lyc.dev>2024-07-04 06:16:00 +0800
commited8bce2e0b2651a07e0467f6b7a6615e1d35389d (patch)
treeafc2d4d9d461b6edc51c8c1174cdca230ebff789
parentda24d3a79d73c725d1b672263e558a3de6cbcde9 (diff)
downloadllvm-ed8bce2e0b2651a07e0467f6b7a6615e1d35389d.zip
llvm-ed8bce2e0b2651a07e0467f6b7a6615e1d35389d.tar.gz
llvm-ed8bce2e0b2651a07e0467f6b7a6615e1d35389d.tar.bz2
[BPF] expand mem intrinsics (memcpy, memmove, memset)users/inclyc/bpf-expand-mem
Declare that we do not support these "RTLIB" symbols. Thus PreISel pass could handle it. Also removes `warn-call.ll` because we will generate loop for memintrins. Fixes: https://github.com/llvm/llvm-project/issues/93700
-rw-r--r--llvm/lib/Target/BPF/BPFISelLowering.cpp7
-rw-r--r--llvm/test/CodeGen/BPF/memintrin.ll87
-rw-r--r--llvm/test/CodeGen/BPF/pr57872.ll182
-rw-r--r--llvm/test/CodeGen/BPF/warn-call.ll66
4 files changed, 108 insertions, 234 deletions
diff --git a/llvm/lib/Target/BPF/BPFISelLowering.cpp b/llvm/lib/Target/BPF/BPFISelLowering.cpp
index 071fe00..671c119 100644
--- a/llvm/lib/Target/BPF/BPFISelLowering.cpp
+++ b/llvm/lib/Target/BPF/BPFISelLowering.cpp
@@ -20,6 +20,7 @@
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
+#include "llvm/CodeGen/RuntimeLibcalls.h"
#include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
#include "llvm/CodeGen/ValueTypes.h"
#include "llvm/IR/DiagnosticInfo.h"
@@ -54,6 +55,12 @@ BPFTargetLowering::BPFTargetLowering(const TargetMachine &TM,
const BPFSubtarget &STI)
: TargetLowering(TM) {
+ // Declare that these mem intrinsics are not available.
+ // PreISel pass should be able to expand them in this case.
+ setLibcallName(RTLIB::MEMCPY, nullptr);
+ setLibcallName(RTLIB::MEMMOVE, nullptr);
+ setLibcallName(RTLIB::MEMSET, nullptr);
+
// Set up the register classes.
addRegisterClass(MVT::i64, &BPF::GPRRegClass);
if (STI.getHasAlu32())
diff --git a/llvm/test/CodeGen/BPF/memintrin.ll b/llvm/test/CodeGen/BPF/memintrin.ll
new file mode 100644
index 0000000..43ad426
--- /dev/null
+++ b/llvm/test/CodeGen/BPF/memintrin.ll
@@ -0,0 +1,87 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
+; RUN: llc -march=bpfel < %s | FileCheck %s
+
+declare void @llvm.memcpy.p0.p0.i64(ptr, ptr, i64, i1)
+
+declare void @llvm.memmove.p0.p0.i64(ptr, ptr, i64, i1)
+
+declare void @llvm.memset.p0.i64(ptr, i8, i64, i1)
+
+define void @memcpy(ptr %a, ptr %b, i64 %len) {
+; CHECK-LABEL: memcpy:
+; CHECK: # %bb.0:
+; CHECK-NEXT: if r3 == 0 goto LBB0_3
+; CHECK-NEXT: # %bb.1: # %loop-memcpy-expansion.preheader
+; CHECK-NEXT: r4 = 0
+; CHECK-NEXT: LBB0_2: # %loop-memcpy-expansion
+; CHECK-NEXT: # =>This Inner Loop Header: Depth=1
+; CHECK-NEXT: r5 = r1
+; CHECK-NEXT: r5 += r4
+; CHECK-NEXT: r0 = r2
+; CHECK-NEXT: r0 += r4
+; CHECK-NEXT: r0 = *(u8 *)(r0 + 0)
+; CHECK-NEXT: *(u8 *)(r5 + 0) = r0
+; CHECK-NEXT: r4 += 1
+; CHECK-NEXT: if r3 > r4 goto LBB0_2
+; CHECK-NEXT: LBB0_3: # %post-loop-memcpy-expansion
+; CHECK-NEXT: exit
+ call void @llvm.memcpy.p0.p0.i64(ptr %a, ptr %b, i64 %len, i1 false)
+ ret void
+}
+
+
+define void @memmove(ptr %a, ptr %b, i64 %len) {
+; CHECK-LABEL: memmove:
+; CHECK: # %bb.0:
+; CHECK-NEXT: if r2 >= r1 goto LBB1_4
+; CHECK-NEXT: # %bb.1: # %copy_backwards
+; CHECK-NEXT: if r3 == 0 goto LBB1_6
+; CHECK-NEXT: # %bb.2: # %copy_backwards_loop.preheader
+; CHECK-NEXT: r2 += -1
+; CHECK-NEXT: r1 += -1
+; CHECK-NEXT: LBB1_3: # %copy_backwards_loop
+; CHECK-NEXT: # =>This Inner Loop Header: Depth=1
+; CHECK-NEXT: r4 = r1
+; CHECK-NEXT: r4 += r3
+; CHECK-NEXT: r5 = r2
+; CHECK-NEXT: r5 += r3
+; CHECK-NEXT: r5 = *(u8 *)(r5 + 0)
+; CHECK-NEXT: *(u8 *)(r4 + 0) = r5
+; CHECK-NEXT: r3 += -1
+; CHECK-NEXT: if r3 == 0 goto LBB1_6
+; CHECK-NEXT: goto LBB1_3
+; CHECK-NEXT: LBB1_4: # %copy_forward
+; CHECK-NEXT: if r3 == 0 goto LBB1_6
+; CHECK-NEXT: LBB1_5: # %copy_forward_loop
+; CHECK-NEXT: # =>This Inner Loop Header: Depth=1
+; CHECK-NEXT: r4 = *(u8 *)(r2 + 0)
+; CHECK-NEXT: *(u8 *)(r1 + 0) = r4
+; CHECK-NEXT: r2 += 1
+; CHECK-NEXT: r1 += 1
+; CHECK-NEXT: r3 += -1
+; CHECK-NEXT: if r3 != 0 goto LBB1_5
+; CHECK-NEXT: LBB1_6: # %memmove_done
+; CHECK-NEXT: exit
+ call void @llvm.memmove.p0.p0.i64(ptr %a, ptr %b, i64 %len, i1 false)
+ ret void
+}
+
+
+define void @memset(ptr %a, i8 %b, i64 %len) {
+; CHECK-LABEL: memset:
+; CHECK: # %bb.0:
+; CHECK-NEXT: if r3 == 0 goto LBB2_3
+; CHECK-NEXT: # %bb.1: # %loadstoreloop.preheader
+; CHECK-NEXT: r4 = 0
+; CHECK-NEXT: LBB2_2: # %loadstoreloop
+; CHECK-NEXT: # =>This Inner Loop Header: Depth=1
+; CHECK-NEXT: r5 = r1
+; CHECK-NEXT: r5 += r4
+; CHECK-NEXT: *(u8 *)(r5 + 0) = r2
+; CHECK-NEXT: r4 += 1
+; CHECK-NEXT: if r3 > r4 goto LBB2_2
+; CHECK-NEXT: LBB2_3: # %split
+; CHECK-NEXT: exit
+ call void @llvm.memset.p0.i64(ptr %a, i8 %b, i64 %len, i1 false)
+ ret void
+}
diff --git a/llvm/test/CodeGen/BPF/pr57872.ll b/llvm/test/CodeGen/BPF/pr57872.ll
index 34f9975..de85141 100644
--- a/llvm/test/CodeGen/BPF/pr57872.ll
+++ b/llvm/test/CodeGen/BPF/pr57872.ll
@@ -6,175 +6,21 @@
define void @foo(ptr %g) {
; CHECK-LABEL: foo:
; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: r2 = 0
; CHECK-NEXT: r1 = *(u64 *)(r1 + 0)
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 83)
-; CHECK-NEXT: *(u8 *)(r10 - 4) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 82)
-; CHECK-NEXT: *(u8 *)(r10 - 5) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 81)
-; CHECK-NEXT: *(u8 *)(r10 - 6) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 80)
-; CHECK-NEXT: *(u8 *)(r10 - 7) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 79)
-; CHECK-NEXT: *(u8 *)(r10 - 8) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 78)
-; CHECK-NEXT: *(u8 *)(r10 - 9) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 77)
-; CHECK-NEXT: *(u8 *)(r10 - 10) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 76)
-; CHECK-NEXT: *(u8 *)(r10 - 11) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 75)
-; CHECK-NEXT: *(u8 *)(r10 - 12) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 74)
-; CHECK-NEXT: *(u8 *)(r10 - 13) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 73)
-; CHECK-NEXT: *(u8 *)(r10 - 14) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 72)
-; CHECK-NEXT: *(u8 *)(r10 - 15) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 71)
-; CHECK-NEXT: *(u8 *)(r10 - 16) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 70)
-; CHECK-NEXT: *(u8 *)(r10 - 17) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 69)
-; CHECK-NEXT: *(u8 *)(r10 - 18) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 68)
-; CHECK-NEXT: *(u8 *)(r10 - 19) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 67)
-; CHECK-NEXT: *(u8 *)(r10 - 20) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 66)
-; CHECK-NEXT: *(u8 *)(r10 - 21) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 65)
-; CHECK-NEXT: *(u8 *)(r10 - 22) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 64)
-; CHECK-NEXT: *(u8 *)(r10 - 23) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 63)
-; CHECK-NEXT: *(u8 *)(r10 - 24) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 62)
-; CHECK-NEXT: *(u8 *)(r10 - 25) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 61)
-; CHECK-NEXT: *(u8 *)(r10 - 26) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 60)
-; CHECK-NEXT: *(u8 *)(r10 - 27) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 59)
-; CHECK-NEXT: *(u8 *)(r10 - 28) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 58)
-; CHECK-NEXT: *(u8 *)(r10 - 29) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 57)
-; CHECK-NEXT: *(u8 *)(r10 - 30) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 56)
-; CHECK-NEXT: *(u8 *)(r10 - 31) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 55)
-; CHECK-NEXT: *(u8 *)(r10 - 32) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 54)
-; CHECK-NEXT: *(u8 *)(r10 - 33) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 53)
-; CHECK-NEXT: *(u8 *)(r10 - 34) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 52)
-; CHECK-NEXT: *(u8 *)(r10 - 35) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 51)
-; CHECK-NEXT: *(u8 *)(r10 - 36) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 50)
-; CHECK-NEXT: *(u8 *)(r10 - 37) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 49)
-; CHECK-NEXT: *(u8 *)(r10 - 38) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 48)
-; CHECK-NEXT: *(u8 *)(r10 - 39) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 47)
-; CHECK-NEXT: *(u8 *)(r10 - 40) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 46)
-; CHECK-NEXT: *(u8 *)(r10 - 41) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 45)
-; CHECK-NEXT: *(u8 *)(r10 - 42) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 44)
-; CHECK-NEXT: *(u8 *)(r10 - 43) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 43)
-; CHECK-NEXT: *(u8 *)(r10 - 44) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 42)
-; CHECK-NEXT: *(u8 *)(r10 - 45) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 41)
-; CHECK-NEXT: *(u8 *)(r10 - 46) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 40)
-; CHECK-NEXT: *(u8 *)(r10 - 47) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 39)
-; CHECK-NEXT: *(u8 *)(r10 - 48) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 38)
-; CHECK-NEXT: *(u8 *)(r10 - 49) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 37)
-; CHECK-NEXT: *(u8 *)(r10 - 50) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 36)
-; CHECK-NEXT: *(u8 *)(r10 - 51) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 35)
-; CHECK-NEXT: *(u8 *)(r10 - 52) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 34)
-; CHECK-NEXT: *(u8 *)(r10 - 53) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 33)
-; CHECK-NEXT: *(u8 *)(r10 - 54) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 32)
-; CHECK-NEXT: *(u8 *)(r10 - 55) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 31)
-; CHECK-NEXT: *(u8 *)(r10 - 56) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 30)
-; CHECK-NEXT: *(u8 *)(r10 - 57) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 29)
-; CHECK-NEXT: *(u8 *)(r10 - 58) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 28)
-; CHECK-NEXT: *(u8 *)(r10 - 59) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 27)
-; CHECK-NEXT: *(u8 *)(r10 - 60) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 26)
-; CHECK-NEXT: *(u8 *)(r10 - 61) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 25)
-; CHECK-NEXT: *(u8 *)(r10 - 62) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 24)
-; CHECK-NEXT: *(u8 *)(r10 - 63) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 23)
-; CHECK-NEXT: *(u8 *)(r10 - 64) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 22)
-; CHECK-NEXT: *(u8 *)(r10 - 65) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 21)
-; CHECK-NEXT: *(u8 *)(r10 - 66) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 20)
-; CHECK-NEXT: *(u8 *)(r10 - 67) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 19)
-; CHECK-NEXT: *(u8 *)(r10 - 68) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 18)
-; CHECK-NEXT: *(u8 *)(r10 - 69) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 17)
-; CHECK-NEXT: *(u8 *)(r10 - 70) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 16)
-; CHECK-NEXT: *(u8 *)(r10 - 71) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 15)
-; CHECK-NEXT: *(u8 *)(r10 - 72) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 14)
-; CHECK-NEXT: *(u8 *)(r10 - 73) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 13)
-; CHECK-NEXT: *(u8 *)(r10 - 74) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 12)
-; CHECK-NEXT: *(u8 *)(r10 - 75) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 11)
-; CHECK-NEXT: *(u8 *)(r10 - 76) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 10)
-; CHECK-NEXT: *(u8 *)(r10 - 77) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 9)
-; CHECK-NEXT: *(u8 *)(r10 - 78) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 8)
-; CHECK-NEXT: *(u8 *)(r10 - 79) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 7)
-; CHECK-NEXT: *(u8 *)(r10 - 80) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 6)
-; CHECK-NEXT: *(u8 *)(r10 - 81) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 5)
-; CHECK-NEXT: *(u8 *)(r10 - 82) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 4)
-; CHECK-NEXT: *(u8 *)(r10 - 83) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 3)
-; CHECK-NEXT: *(u8 *)(r10 - 84) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 2)
-; CHECK-NEXT: *(u8 *)(r10 - 85) = r2
-; CHECK-NEXT: r2 = *(u8 *)(r1 + 1)
-; CHECK-NEXT: *(u8 *)(r10 - 86) = r2
-; CHECK-NEXT: r1 = *(u8 *)(r1 + 0)
-; CHECK-NEXT: *(u8 *)(r10 - 87) = r1
+; CHECK-NEXT: r3 = 84
+; CHECK-NEXT: LBB0_1: # %load-store-loop
+; CHECK-NEXT: # =>This Inner Loop Header: Depth=1
+; CHECK-NEXT: r4 = r10
+; CHECK-NEXT: r4 += -88
+; CHECK-NEXT: r4 += r2
+; CHECK-NEXT: r5 = r1
+; CHECK-NEXT: r5 += r2
+; CHECK-NEXT: r5 = *(u8 *)(r5 + 0)
+; CHECK-NEXT: *(u8 *)(r4 + 1) = r5
+; CHECK-NEXT: r2 += 1
+; CHECK-NEXT: if r3 > r2 goto LBB0_1
+; CHECK-NEXT: # %bb.2: # %memcpy-split
; CHECK-NEXT: r1 = r10
; CHECK-NEXT: r1 += -88
; CHECK-NEXT: call bar
diff --git a/llvm/test/CodeGen/BPF/warn-call.ll b/llvm/test/CodeGen/BPF/warn-call.ll
deleted file mode 100644
index fbfaead..0000000
--- a/llvm/test/CodeGen/BPF/warn-call.ll
+++ /dev/null
@@ -1,66 +0,0 @@
-; RUN: not llc -march=bpfel < %s 2>&1 >/dev/null | FileCheck %s
-
-; CHECK: error: warn_call.c
-; CHECK: built-in function 'memcpy'
-define ptr @warn(ptr returned, ptr, i64) local_unnamed_addr #0 !dbg !6 {
- tail call void @llvm.dbg.value(metadata ptr %0, i64 0, metadata !14, metadata !17), !dbg !18
- tail call void @llvm.dbg.value(metadata ptr %1, i64 0, metadata !15, metadata !17), !dbg !19
- tail call void @llvm.dbg.value(metadata i64 %2, i64 0, metadata !16, metadata !17), !dbg !20
- tail call void @llvm.memcpy.p0.p0.i64(ptr %0, ptr %1, i64 %2, i1 false), !dbg !21
- %4 = tail call ptr @foo(ptr %0, ptr %1, i64 %2) #5, !dbg !22
- %5 = tail call fastcc ptr @bar(ptr %0), !dbg !23
- ret ptr %5, !dbg !24
-}
-
-; Function Attrs: argmemonly nounwind
-declare void @llvm.memcpy.p0.p0.i64(ptr nocapture writeonly, ptr nocapture readonly, i64, i1) #1
-
-declare ptr @foo(ptr, ptr, i64) local_unnamed_addr #2
-
-; Function Attrs: noinline nounwind readnone
-define internal fastcc ptr @bar(ptr readnone returned) unnamed_addr #3 !dbg !25 {
- tail call void @llvm.dbg.value(metadata ptr null, i64 0, metadata !28, metadata !17), !dbg !30
- tail call void @llvm.dbg.value(metadata i64 0, i64 0, metadata !29, metadata !17), !dbg !31
- ret ptr %0, !dbg !32
-}
-
-; Function Attrs: nounwind readnone
-declare void @llvm.dbg.value(metadata, i64, metadata, metadata) #4
-
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!3, !4}
-!llvm.ident = !{!5}
-
-!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 5.0.0 (trunk 292174) (llvm/trunk 292179)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
-!1 = !DIFile(filename: "warn_call.c", directory: "/w/llvm/bld")
-!2 = !{}
-!3 = !{i32 2, !"Dwarf Version", i32 4}
-!4 = !{i32 2, !"Debug Info Version", i32 3}
-!5 = !{!"clang version 5.0.0 (trunk 292174) (llvm/trunk 292179)"}
-!6 = distinct !DISubprogram(name: "warn", scope: !1, file: !1, line: 4, type: !7, isLocal: false, isDefinition: true, scopeLine: 5, flags: DIFlagPrototyped, isOptimized: true, unit: !0, retainedNodes: !13)
-!7 = !DISubroutineType(types: !8)
-!8 = !{!9, !9, !10, !12}
-!9 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64)
-!10 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !11, size: 64)
-!11 = !DIDerivedType(tag: DW_TAG_const_type, baseType: null)
-!12 = !DIBasicType(name: "long unsigned int", size: 64, encoding: DW_ATE_unsigned)
-!13 = !{!14, !15, !16}
-!14 = !DILocalVariable(name: "dst", arg: 1, scope: !6, file: !1, line: 4, type: !9)
-!15 = !DILocalVariable(name: "src", arg: 2, scope: !6, file: !1, line: 4, type: !10)
-!16 = !DILocalVariable(name: "len", arg: 3, scope: !6, file: !1, line: 4, type: !12)
-!17 = !DIExpression()
-!18 = !DILocation(line: 4, column: 18, scope: !6)
-!19 = !DILocation(line: 4, column: 35, scope: !6)
-!20 = !DILocation(line: 4, column: 54, scope: !6)
-!21 = !DILocation(line: 6, column: 2, scope: !6)
-!22 = !DILocation(line: 7, column: 2, scope: !6)
-!23 = !DILocation(line: 8, column: 9, scope: !6)
-!24 = !DILocation(line: 8, column: 2, scope: !6)
-!25 = distinct !DISubprogram(name: "bar", scope: !1, file: !1, line: 2, type: !7, isLocal: true, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: true, unit: !0, retainedNodes: !26)
-!26 = !{!27, !28, !29}
-!27 = !DILocalVariable(name: "dst", arg: 1, scope: !25, file: !1, line: 2, type: !9)
-!28 = !DILocalVariable(name: "src", arg: 2, scope: !25, file: !1, line: 2, type: !10)
-!29 = !DILocalVariable(name: "len", arg: 3, scope: !25, file: !1, line: 2, type: !12)
-!30 = !DILocation(line: 2, column: 67, scope: !25)
-!31 = !DILocation(line: 2, column: 86, scope: !25)
-!32 = !DILocation(line: 2, column: 93, scope: !25)