Imported Upstream version 5.18.0.167

Former-commit-id: 289509151e0fee68a1b591a20c9f109c3c789d3a
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2018-10-20 08:25:10 +00:00
parent e19d552987
commit b084638f15
28489 changed files with 184 additions and 3866856 deletions

View File

@ -1,64 +0,0 @@
; RUN: llc -mtriple mips-linux-gnu -O2 %s -o - | FileCheck %s
; Check struct X for dead variable xyz from inlined function foo.
; CHECK: .section .debug_info,"",@0x7000001e
; CHECK: DW_TAG_structure_type
; CHECK-NEXT: info_string
source_filename = "test/DebugInfo/Mips/InlinedFnLocalVar.ll"
@i = common global i32 0, !dbg !0
; Function Attrs: nounwind readnone
declare void @llvm.dbg.declare(metadata, metadata, metadata) #0
; Function Attrs: nounwind readnone
declare void @llvm.dbg.value(metadata, metadata, metadata) #0
; Function Attrs: nounwind ssp
define i32 @bar() #1 !dbg !8 {
entry:
%0 = load i32, i32* @i, align 4, !dbg !11
tail call void @llvm.dbg.value(metadata i32 %0, metadata !13, metadata !24), !dbg !25
tail call void @llvm.dbg.declare(metadata !5, metadata !18, metadata !24), !dbg !26
%1 = mul nsw i32 %0, %0, !dbg !27
store i32 %1, i32* @i, align 4, !dbg !11
ret i32 %1, !dbg !28
}
attributes #0 = { nounwind readnone }
attributes #1 = { nounwind ssp }
!llvm.dbg.cu = !{!4}
!llvm.module.flags = !{!7}
!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
!1 = !DIGlobalVariable(name: "i", scope: !2, file: !2, line: 5, type: !3, isLocal: false, isDefinition: true)
!2 = !DIFile(filename: "bar.c", directory: "/tmp/")
!3 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
!4 = distinct !DICompileUnit(language: DW_LANG_C89, file: !2, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !5, retainedTypes: !5, globals: !6, imports: !5)
!5 = !{}
!6 = !{!0}
!7 = !{i32 1, !"Debug Info Version", i32 3}
!8 = distinct !DISubprogram(name: "bar", linkageName: "bar", scope: !2, file: !2, line: 14, type: !9, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !4)
!9 = !DISubroutineType(types: !10)
!10 = !{!3}
!11 = !DILocation(line: 15, scope: !12)
!12 = distinct !DILexicalBlock(scope: !8, file: !2, line: 14)
!13 = !DILocalVariable(name: "j", arg: 1, scope: !14, file: !2, line: 9, type: !3)
!14 = distinct !DISubprogram(name: "foo", scope: !2, file: !2, line: 9, type: !15, isLocal: true, isDefinition: true, scopeLine: 9, virtualIndex: 6, isOptimized: true, unit: !4, variables: !17)
!15 = !DISubroutineType(types: !16)
!16 = !{!3, !3}
!17 = !{!13, !18}
!18 = !DILocalVariable(name: "xyz", scope: !19, file: !2, line: 10, type: !20)
!19 = distinct !DILexicalBlock(scope: !14, file: !2, line: 9)
!20 = !DICompositeType(tag: DW_TAG_structure_type, name: "X", scope: !14, file: !2, line: 10, size: 64, align: 32, elements: !21)
!21 = !{!22, !23}
!22 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !20, file: !2, line: 10, baseType: !3, size: 32, align: 32)
!23 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !20, file: !2, line: 10, baseType: !3, size: 32, align: 32, offset: 32)
!24 = !DIExpression()
!25 = !DILocation(line: 9, scope: !14, inlinedAt: !11)
!26 = !DILocation(line: 9, scope: !19, inlinedAt: !11)
!27 = !DILocation(line: 11, scope: !19, inlinedAt: !11)
!28 = !DILocation(line: 16, scope: !12)

View File

@ -1,76 +0,0 @@
; RUN: llc -filetype=obj -O0 -relocation-model=pic < %s -mtriple mips-unknown-linux-gnu | llvm-dwarfdump -a - | FileCheck %s
; PR19815
; Generated using clang -target mips-linux-gnu -g test.c -S -o - -flto|opt -sroa -S
; test.c:
;
; int foo(int x) {
; if (x)
; return 0;
; return 1;
; }
; CHECK: Address Line Column File ISA Discriminator Flags
; CHECK: ------------------ ------ ------ ------ --- ------------- -------------
; CHECK: 0x0000000000000000 1 0 1 0 0 is_stmt
; FIXME: The next address probably ought to be 0x0000000000000004 but there's
; a constant initialization before the prologue's end.
; CHECK: 0x0000000000000008 2 0 1 0 0 is_stmt prologue_end
; CHECK: 0x000000000000002c 3 0 1 0 0 is_stmt
; CHECK: 0x000000000000003c 4 0 1 0 0 is_stmt
; CHECK: 0x0000000000000048 5 0 1 0 0 is_stmt
; CHECK: 0x0000000000000058 5 0 1 0 0 is_stmt end_sequence
target datalayout = "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64"
target triple = "mips--linux-gnu"
; Function Attrs: nounwind
define i32 @foo(i32 %x) #0 !dbg !4 {
entry:
call void @llvm.dbg.value(metadata i32 %x, metadata !12, metadata !DIExpression()), !dbg !13
%tobool = icmp ne i32 %x, 0, !dbg !14
br i1 %tobool, label %if.then, label %if.end, !dbg !14
if.then: ; preds = %entry
br label %return, !dbg !16
if.end: ; preds = %entry
br label %return, !dbg !17
return: ; preds = %if.end, %if.then
%retval.0 = phi i32 [ 0, %if.then ], [ 1, %if.end ]
ret i32 %retval.0, !dbg !18
}
; Function Attrs: nounwind readnone
declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
; Function Attrs: nounwind readnone
declare void @llvm.dbg.value(metadata, metadata, metadata) #1
attributes #0 = { nounwind }
attributes #1 = { nounwind readnone }
!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!9, !10}
!llvm.ident = !{!11}
!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2)
!1 = !DIFile(filename: "test.c", directory: "/tmp")
!2 = !{}
!4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2)
!5 = !DIFile(filename: "test.c", directory: "/tmp")
!6 = !DISubroutineType(types: !7)
!7 = !{!8, !8}
!8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
!9 = !{i32 2, !"Dwarf Version", i32 4}
!10 = !{i32 2, !"Debug Info Version", i32 3}
!11 = !{!"clang version 3.5.0"}
!12 = !DILocalVariable(name: "x", line: 1, arg: 1, scope: !4, file: !5, type: !8)
!13 = !DILocation(line: 1, scope: !4)
!14 = !DILocation(line: 2, scope: !15)
!15 = distinct !DILexicalBlock(line: 2, column: 0, file: !1, scope: !4)
!16 = !DILocation(line: 3, scope: !15)
!17 = !DILocation(line: 4, scope: !4)
!18 = !DILocation(line: 5, scope: !4)

View File

@ -1,150 +0,0 @@
; RUN: llc -march=mips -mcpu=mips32r2 -O1 -filetype=obj -relocation-model=pic <%s | \
; RUN: llvm-dwarfdump -v -all - | FileCheck %s
; void foo(int *);
;
; int f0(int a, int b, int c, int d, int e) {
; int x = a + b + c + d + e;
; foo(&x);
; return x;
; }
;
; int f1(int a, int b, int c, int d, int e) {
; int x __attribute__((aligned(16))) = a + b + c + d + e;
; foo(&x);
; return x;
; }
declare void @llvm.lifetime.start(i64, i8* nocapture)
declare void @llvm.lifetime.end(i64, i8* nocapture)
declare void @foo(i32*)
; CHECK: DW_AT_name {{.*}}"e"
; CHECK: DW_TAG_variable
; CHECK-NEXT: DW_AT_location [DW_FORM_sec_offset] (
; CHECK-NEXT: 0x0000000000000028 - 0x000000000000002c: DW_OP_reg1 AT_64
; CHECK-NEXT: 0x000000000000002c - 0x0000000000000048: DW_OP_breg29 SP_64+16, DW_OP_deref)
; CHECK-NEXT: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000006b] = "x")
define i32 @f0(i32 signext %a, i32 signext %b, i32 signext %c, i32 signext %d, i32 signext %e) !dbg !4 {
entry:
%x = alloca i32, align 4
tail call void @llvm.dbg.value(metadata i32 %a, metadata !9, metadata !DIExpression()), !dbg !27
tail call void @llvm.dbg.value(metadata i32 %b, metadata !10, metadata !DIExpression()), !dbg !28
tail call void @llvm.dbg.value(metadata i32 %c, metadata !11, metadata !DIExpression()), !dbg !29
tail call void @llvm.dbg.value(metadata i32 %d, metadata !12, metadata !DIExpression()), !dbg !30
tail call void @llvm.dbg.value(metadata i32 %e, metadata !13, metadata !DIExpression()), !dbg !31
%0 = bitcast i32* %x to i8*, !dbg !32
call void @llvm.lifetime.start(i64 4, i8* %0) #4, !dbg !32
%add = add nsw i32 %b, %a, !dbg !33
%add1 = add nsw i32 %add, %c, !dbg !34
%add2 = add nsw i32 %add1, %d, !dbg !35
%add3 = add nsw i32 %add2, %e, !dbg !36
tail call void @llvm.dbg.value(metadata i32 %add3, metadata !14, metadata !DIExpression()), !dbg !37
store i32 %add3, i32* %x, align 4, !dbg !37, !tbaa !38
tail call void @llvm.dbg.value(metadata i32* %x, metadata !14, metadata !26), !dbg !37
call void @foo(i32* nonnull %x) #4, !dbg !42
call void @llvm.dbg.value(metadata i32* %x, metadata !14, metadata !26), !dbg !37
%1 = load i32, i32* %x, align 4, !dbg !43, !tbaa !38
call void @llvm.lifetime.end(i64 4, i8* %0) #4, !dbg !44
ret i32 %1, !dbg !45
}
; CHECK: DW_TAG_variable
; CHECK-NEXT: DW_AT_location [DW_FORM_sec_offset] (
; CHECK-NEXT: 0x0000000000000080 - 0x0000000000000084: DW_OP_reg1 AT_64
; CHECK-NEXT: 0x0000000000000084 - 0x0000000000000098: DW_OP_breg29 SP_64+16, DW_OP_deref)
; CHECK-NEXT: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000006b] = "x")
define i32 @f1(i32 signext %a, i32 signext %b, i32 signext %c, i32 signext %d, i32 signext %e) !dbg !15 {
entry:
%x = alloca i32, align 16
tail call void @llvm.dbg.value(metadata i32 %a, metadata !17, metadata !DIExpression()), !dbg !46
tail call void @llvm.dbg.value(metadata i32 %b, metadata !18, metadata !DIExpression()), !dbg !47
tail call void @llvm.dbg.value(metadata i32 %c, metadata !19, metadata !DIExpression()), !dbg !48
tail call void @llvm.dbg.value(metadata i32 %d, metadata !20, metadata !DIExpression()), !dbg !49
tail call void @llvm.dbg.value(metadata i32 %e, metadata !21, metadata !DIExpression()), !dbg !50
%0 = bitcast i32* %x to i8*, !dbg !51
call void @llvm.lifetime.start(i64 4, i8* %0) #4, !dbg !51
%add = add nsw i32 %b, %a, !dbg !52
%add1 = add nsw i32 %add, %c, !dbg !53
%add2 = add nsw i32 %add1, %d, !dbg !54
%add3 = add nsw i32 %add2, %e, !dbg !55
tail call void @llvm.dbg.value(metadata i32 %add3, metadata !22, metadata !DIExpression()), !dbg !56
store i32 %add3, i32* %x, align 16, !dbg !56, !tbaa !38
tail call void @llvm.dbg.value(metadata i32* %x, metadata !22, metadata !26), !dbg !56
call void @foo(i32* nonnull %x) #4, !dbg !57
call void @llvm.dbg.value(metadata i32* %x, metadata !22, metadata !26), !dbg !56
%1 = load i32, i32* %x, align 16, !dbg !58, !tbaa !38
call void @llvm.lifetime.end(i64 4, i8* %0) #4, !dbg !59
ret i32 %1, !dbg !60
}
declare void @llvm.dbg.value(metadata, metadata, metadata)
!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!23, !24}
!llvm.ident = !{!25}
!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 251783) (llvm/trunk 251781)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
!1 = !DIFile(filename: "test.c", directory: "/home/vk/repos/tmp/dwarf")
!2 = !{}
!4 = distinct !DISubprogram(name: "f0", scope: !1, file: !1, line: 4, type: !5, isLocal: false, isDefinition: true, scopeLine: 4, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !8)
!5 = !DISubroutineType(types: !6)
!6 = !{!7, !7, !7, !7, !7, !7}
!7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
!8 = !{!9, !10, !11, !12, !13, !14}
!9 = !DILocalVariable(name: "a", arg: 1, scope: !4, file: !1, line: 4, type: !7)
!10 = !DILocalVariable(name: "b", arg: 2, scope: !4, file: !1, line: 4, type: !7)
!11 = !DILocalVariable(name: "c", arg: 3, scope: !4, file: !1, line: 4, type: !7)
!12 = !DILocalVariable(name: "d", arg: 4, scope: !4, file: !1, line: 4, type: !7)
!13 = !DILocalVariable(name: "e", arg: 5, scope: !4, file: !1, line: 4, type: !7)
!14 = !DILocalVariable(name: "x", scope: !4, file: !1, line: 5, type: !7)
!15 = distinct !DISubprogram(name: "f1", scope: !1, file: !1, line: 11, type: !5, isLocal: false, isDefinition: true, scopeLine: 11, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !16)
!16 = !{!17, !18, !19, !20, !21, !22}
!17 = !DILocalVariable(name: "a", arg: 1, scope: !15, file: !1, line: 11, type: !7)
!18 = !DILocalVariable(name: "b", arg: 2, scope: !15, file: !1, line: 11, type: !7)
!19 = !DILocalVariable(name: "c", arg: 3, scope: !15, file: !1, line: 11, type: !7)
!20 = !DILocalVariable(name: "d", arg: 4, scope: !15, file: !1, line: 11, type: !7)
!21 = !DILocalVariable(name: "e", arg: 5, scope: !15, file: !1, line: 11, type: !7)
!22 = !DILocalVariable(name: "x", scope: !15, file: !1, line: 12, type: !7)
!23 = !{i32 2, !"Dwarf Version", i32 4}
!24 = !{i32 2, !"Debug Info Version", i32 3}
!25 = !{!"clang version 3.8.0 (trunk 251783) (llvm/trunk 251781)"}
!26 = !DIExpression(DW_OP_deref)
!27 = !DILocation(line: 4, column: 12, scope: !4)
!28 = !DILocation(line: 4, column: 19, scope: !4)
!29 = !DILocation(line: 4, column: 26, scope: !4)
!30 = !DILocation(line: 4, column: 33, scope: !4)
!31 = !DILocation(line: 4, column: 40, scope: !4)
!32 = !DILocation(line: 5, column: 3, scope: !4)
!33 = !DILocation(line: 5, column: 13, scope: !4)
!34 = !DILocation(line: 5, column: 17, scope: !4)
!35 = !DILocation(line: 5, column: 21, scope: !4)
!36 = !DILocation(line: 5, column: 25, scope: !4)
!37 = !DILocation(line: 5, column: 7, scope: !4)
!38 = !{!39, !39, i64 0}
!39 = !{!"int", !40, i64 0}
!40 = !{!"omnipotent char", !41, i64 0}
!41 = !{!"Simple C/C++ TBAA"}
!42 = !DILocation(line: 6, column: 3, scope: !4)
!43 = !DILocation(line: 7, column: 10, scope: !4)
!44 = !DILocation(line: 8, column: 1, scope: !4)
!45 = !DILocation(line: 7, column: 3, scope: !4)
!46 = !DILocation(line: 11, column: 12, scope: !15)
!47 = !DILocation(line: 11, column: 19, scope: !15)
!48 = !DILocation(line: 11, column: 26, scope: !15)
!49 = !DILocation(line: 11, column: 33, scope: !15)
!50 = !DILocation(line: 11, column: 40, scope: !15)
!51 = !DILocation(line: 12, column: 3, scope: !15)
!52 = !DILocation(line: 12, column: 42, scope: !15)
!53 = !DILocation(line: 12, column: 46, scope: !15)
!54 = !DILocation(line: 12, column: 50, scope: !15)
!55 = !DILocation(line: 12, column: 54, scope: !15)
!56 = !DILocation(line: 12, column: 7, scope: !15)
!57 = !DILocation(line: 13, column: 3, scope: !15)
!58 = !DILocation(line: 14, column: 10, scope: !15)
!59 = !DILocation(line: 15, column: 1, scope: !15)
!60 = !DILocation(line: 14, column: 3, scope: !15)

View File

@ -1,122 +0,0 @@
; RUN: llc -march=mips -mcpu=mips32r2 -O0 -filetype=obj -fast-isel=0 <%s | \
; RUN: llvm-dwarfdump -v -all - | FileCheck %s
declare void @llvm.dbg.declare(metadata, metadata, metadata)
declare void @foo(i32*)
; void foo(int *);
;
; int f2(int a, int b) {
; int c __attribute__((aligned(16))) = a + b;
; foo(&c);
; return c;
; }
;
; int *f3(int a, int b) {
; int c __attribute__((aligned(16))) = a + b;
; int *w = alloca(c);
; foo(&c);
; return w;
; }
; CHECK: DW_TAG_subprogram
; CHECK: DW_AT_location [DW_FORM_exprloc] (DW_OP_breg29 SP_64+36)
; CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000065] = "c")
; Function Attrs: nounwind
define i32 @f2(i32 signext %a, i32 signext %b) !dbg !4 {
entry:
%a.addr = alloca i32, align 4
%b.addr = alloca i32, align 4
%c = alloca i32, align 16
store i32 %a, i32* %a.addr, align 4
call void @llvm.dbg.declare(metadata i32* %a.addr, metadata !15, metadata !16), !dbg !17
store i32 %b, i32* %b.addr, align 4
call void @llvm.dbg.declare(metadata i32* %b.addr, metadata !18, metadata !16), !dbg !19
call void @llvm.dbg.declare(metadata i32* %c, metadata !20, metadata !16), !dbg !21
%0 = load i32, i32* %a.addr, align 4, !dbg !22
%1 = load i32, i32* %b.addr, align 4, !dbg !23
%add = add nsw i32 %0, %1, !dbg !24
store i32 %add, i32* %c, align 16, !dbg !21
call void @foo(i32* %c), !dbg !25
%2 = load i32, i32* %c, align 16, !dbg !26
ret i32 %2, !dbg !27
}
; CHECK: DW_TAG_subprogram
; CHECK: DW_AT_location [DW_FORM_exprloc] (DW_OP_breg23 S7_64+32)
; CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000065] = "c")
define i32* @f3(i32 signext %a, i32 signext %b) !dbg !8 {
entry:
%a.addr = alloca i32, align 4
%b.addr = alloca i32, align 4
%c = alloca i32, align 16
%w = alloca i32*, align 4
store i32 %a, i32* %a.addr, align 4
call void @llvm.dbg.declare(metadata i32* %a.addr, metadata !28, metadata !16), !dbg !29
store i32 %b, i32* %b.addr, align 4
call void @llvm.dbg.declare(metadata i32* %b.addr, metadata !30, metadata !16), !dbg !31
call void @llvm.dbg.declare(metadata i32* %c, metadata !32, metadata !16), !dbg !33
%0 = load i32, i32* %a.addr, align 4, !dbg !34
%1 = load i32, i32* %b.addr, align 4, !dbg !35
%add = add nsw i32 %0, %1, !dbg !36
store i32 %add, i32* %c, align 16, !dbg !33
call void @llvm.dbg.declare(metadata i32** %w, metadata !37, metadata !DIExpression(DW_OP_deref)), !dbg !38
%2 = load i32, i32* %c, align 16, !dbg !39
%3 = alloca i8, i32 %2, !dbg !40
%4 = bitcast i8* %3 to i32*, !dbg !40
store i32* %4, i32** %w, align 4, !dbg !38
call void @foo(i32* %c), !dbg !41
%5 = load i32*, i32** %w, align 4, !dbg !42
ret i32* %5, !dbg !43
}
!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!12, !13}
!llvm.ident = !{!14}
!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 251783) (llvm/trunk 251781)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
!1 = !DIFile(filename: "test.c", directory: "/home/vk/repos/tmp/dwarf")
!2 = !{}
!4 = distinct !DISubprogram(name: "f2", scope: !1, file: !1, line: 20, type: !5, isLocal: false, isDefinition: true, scopeLine: 20, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2)
!5 = !DISubroutineType(types: !6)
!6 = !{!7, !7, !7}
!7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
!8 = distinct !DISubprogram(name: "f3", scope: !1, file: !1, line: 27, type: !9, isLocal: false, isDefinition: true, scopeLine: 27, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2)
!9 = !DISubroutineType(types: !10)
!10 = !{!11, !7, !7}
!11 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !7, size: 32, align: 32)
!12 = !{i32 2, !"Dwarf Version", i32 4}
!13 = !{i32 2, !"Debug Info Version", i32 3}
!14 = !{!"clang version 3.8.0 (trunk 251783) (llvm/trunk 251781)"}
!15 = !DILocalVariable(name: "a", arg: 1, scope: !4, file: !1, line: 20, type: !7)
!16 = !DIExpression()
!17 = !DILocation(line: 20, column: 12, scope: !4)
!18 = !DILocalVariable(name: "b", arg: 2, scope: !4, file: !1, line: 20, type: !7)
!19 = !DILocation(line: 20, column: 19, scope: !4)
!20 = !DILocalVariable(name: "c", scope: !4, file: !1, line: 21, type: !7)
!21 = !DILocation(line: 21, column: 7, scope: !4)
!22 = !DILocation(line: 21, column: 40, scope: !4)
!23 = !DILocation(line: 21, column: 44, scope: !4)
!24 = !DILocation(line: 21, column: 42, scope: !4)
!25 = !DILocation(line: 22, column: 3, scope: !4)
!26 = !DILocation(line: 23, column: 10, scope: !4)
!27 = !DILocation(line: 23, column: 3, scope: !4)
!28 = !DILocalVariable(name: "a", arg: 1, scope: !8, file: !1, line: 27, type: !7)
!29 = !DILocation(line: 27, column: 13, scope: !8)
!30 = !DILocalVariable(name: "b", arg: 2, scope: !8, file: !1, line: 27, type: !7)
!31 = !DILocation(line: 27, column: 20, scope: !8)
!32 = !DILocalVariable(name: "c", scope: !8, file: !1, line: 28, type: !7)
!33 = !DILocation(line: 28, column: 7, scope: !8)
!34 = !DILocation(line: 28, column: 40, scope: !8)
!35 = !DILocation(line: 28, column: 44, scope: !8)
!36 = !DILocation(line: 28, column: 42, scope: !8)
!37 = !DILocalVariable(name: "w", scope: !8, file: !1, line: 29, type: !11)
!38 = !DILocation(line: 29, column: 8, scope: !8)
!39 = !DILocation(line: 29, column: 19, scope: !8)
!40 = !DILocation(line: 29, column: 12, scope: !8)
!41 = !DILocation(line: 30, column: 3, scope: !8)
!42 = !DILocation(line: 31, column: 10, scope: !8)
!43 = !DILocation(line: 31, column: 3, scope: !8)

View File

@ -1,21 +0,0 @@
; RUN: llc -O0 -march=mips -mcpu=mips32r2 -filetype=obj -o=%t-32.o < %s
; RUN: llvm-dwarfdump %t-32.o 2>&1 | FileCheck %s
; RUN: llc -O0 -march=mips64 -mcpu=mips64r2 -filetype=obj -o=%t-64.o < %s
; RUN: llvm-dwarfdump %t-64.o 2>&1 | FileCheck %s
@x = thread_local global i32 5, align 4, !dbg !0
; CHECK-NOT: error: failed to compute relocation: R_MIPS_TLS_DTPREL
!llvm.dbg.cu = !{!2}
!llvm.module.flags = !{!7, !8}
!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
!1 = distinct !DIGlobalVariable(name: "x", scope: !2, file: !3, line: 1, type: !6, isLocal: false, isDefinition: true)
!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang version 4.0.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5)
!3 = !DIFile(filename: "tls.c", directory: "/tmp")
!4 = !{}
!5 = !{!0}
!6 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
!7 = !{i32 2, !"Dwarf Version", i32 4}
!8 = !{i32 2, !"Debug Info Version", i32 3}

View File

@ -1,83 +0,0 @@
; RUN: llc -mtriple=mips-linux-gnu -filetype=asm -asm-verbose=0 -O0 -relocation-model=pic < %s | FileCheck %s
; RUN: llc -mtriple=mips-linux-gnu -filetype=obj -O0 < %s | llvm-dwarfdump -debug-line - | FileCheck %s --check-prefix=INT
; Mips used to generate 'jumpy' debug line info around calls. The address
; calculation for each call to f1() would share the same line info so it would
; emit output of the form:
; .loc $first_call_location
; .. address calculation ..
; .. function call ..
; .. address calculation ..
; .loc $second_call_location
; .. function call ..
; .loc $first_call_location
; .. address calculation ..
; .loc $third_call_location
; .. function call ..
; ...
; which would cause confusing stepping behaviour for the end user.
;
; This test checks that we emit more user friendly debug line info of the form:
; .loc $first_call_location
; .. address calculation ..
; .. function call ..
; .loc $second_call_location
; .. address calculation ..
; .. function call ..
; .loc $third_call_location
; .. address calculation ..
; .. function call ..
; ...
;
; Generated with clang from fn-call-line.c:
; void f1();
; void f2() {
; f1();
; f1();
; }
; CHECK: .loc 1 3 3
; CHECK-NOT: .loc
; CHECK: %call16(f1)
; CHECK-NOT: .loc
; CHECK: .loc 1 4 3
; CHECK-NOT: .loc
; CHECK: %call16(f1)
; INT: {{^}}Address
; INT: -----
; INT-NEXT: 2 0 1 0 0 is_stmt{{$}}
; INT-NEXT: 3 3 1 0 0 is_stmt prologue_end{{$}}
; INT-NEXT: 4 3 1 0 0 is_stmt{{$}}
; Function Attrs: nounwind uwtable
define void @f2() #0 !dbg !4 {
entry:
call void (...) @f1(), !dbg !11
call void (...) @f1(), !dbg !12
ret void, !dbg !13
}
declare void @f1(...) #1
attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
attributes #1 = { "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!8, !9}
!llvm.ident = !{!10}
!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.7.0 (trunk 226641)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2)
!1 = !DIFile(filename: "fn-call-line.c", directory: "/tmp/dbginfo")
!2 = !{}
!4 = distinct !DISubprogram(name: "f2", line: 2, isLocal: false, isDefinition: true, isOptimized: false, unit: !0, scopeLine: 2, file: !1, scope: !5, type: !6, variables: !2)
!5 = !DIFile(filename: "fn-call-line.c", directory: "/tmp/dbginfo")
!6 = !DISubroutineType(types: !7)
!7 = !{null}
!8 = !{i32 2, !"Dwarf Version", i32 4}
!9 = !{i32 2, !"Debug Info Version", i32 3}
!10 = !{!"clang version 3.7.0 (trunk 226641)"}
!11 = !DILocation(line: 3, column: 3, scope: !4)
!12 = !DILocation(line: 4, column: 3, scope: !4)
!13 = !DILocation(line: 5, column: 1, scope: !4)

View File

@ -1,2 +0,0 @@
if not 'Mips' in config.root.targets:
config.unsupported = True

View File

@ -1,17 +0,0 @@
; RUN: llc -filetype=obj -O0 < %s -mtriple mips-unknown-linux | \
; RUN: llvm-dwarfdump - 2>&1 | FileCheck %s
; RUN: llc -filetype=obj -O0 < %s -mtriple mips64-unknown-linux | \
; RUN: llvm-dwarfdump - 2>&1 | FileCheck %s
; CHECK-NOT: failed to compute relocation
!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!3, !4}
!llvm.ident = !{!5}
!0 = !{i32 786449, !1, i32 12, !"clang version 3.6.0 ", i1 false, !"", i32 0, !2, !2, !2, !2, !2, !"", i32 1} ; [ DW_TAG_compile_unit ] [/a/empty.c] [DW_LANG_C99]
!1 = !{!"empty.c", !"/a"}
!2 = !{}
!3 = !{i32 2, !"Dwarf Version", i32 4}
!4 = !{i32 2, !"Debug Info Version", i32 1}
!5 = !{!"clang version 3.6.0 "}

View File

@ -1,69 +0,0 @@
; RUN: llc -O0 -mtriple mips-unknown-linux-gnu -relocation-model=static < %s | FileCheck %s -check-prefix=STATIC
; RUN: llc -O0 -mtriple mips-unknown-linux-gnu -relocation-model=static -disable-fp-elim < %s | FileCheck %s -check-prefix=STATIC-FP
; RUN: llc -O0 -mtriple mips-unknown-linux-gnu -relocation-model=pic < %s | FileCheck %s -check-prefix=PIC
; RUN: llc -O0 -mtriple mips-unknown-linux-gnu -relocation-model=pic -disable-fp-elim < %s | FileCheck %s -check-prefix=PIC-FP
; Generated using clang -O0 -emit-llvm -S -target mipsel-unknown-linux -g test.c -o test.ll
; test.c:
;
; void hello_world(void) {
; printf("Hello, World!\n");
; }
@.str = private unnamed_addr constant [15 x i8] c"Hello, World!\0A\00", align 1
define void @hello_world() #0 !dbg !4 {
entry:
; STATIC: addiu $sp, $sp, -{{[0-9]+}}
; STATIC: sw $ra, {{[0-9]+}}($sp)
; STATIC: .loc 1 2 3 prologue_end
; STATIC: lui $[[R0:[0-9]+]], %hi($.str)
; STATIC-FP: addiu $sp, $sp, -{{[0-9]+}}
; STATIC-FP: sw $ra, {{[0-9]+}}($sp)
; STATIC-FP: sw $fp, {{[0-9]+}}($sp)
; STATIC-FP: move $fp, $sp
; STATIC-FP: .loc 1 2 3 prologue_end
; STATIC-FP: lui $[[R0:[0-9]+]], %hi($.str)
; PIC: lui $[[R0:[0-9]+]], %hi(_gp_disp)
; PIC: addiu $[[R0]], $[[R0]], %lo(_gp_disp)
; PIC: addiu $sp, $sp, -{{[0-9]+}}
; PIC: sw $ra, {{[0-9]+}}($sp)
; PIC: addu $[[R1:[0-9]+]], $[[R0]], $25
; PIC: .loc 1 2 3 prologue_end
; PIC: lw $[[R2:[0-9]+]], %got($.str)($[[R1]])
; PIC-FP: lui $[[R0:[0-9]+]], %hi(_gp_disp)
; PIC-FP: addiu $[[R0]], $[[R0]], %lo(_gp_disp)
; PIC-FP: addiu $sp, $sp, -{{[0-9]+}}
; PIC-FP: sw $ra, {{[0-9]+}}($sp)
; PIC-FP: sw $fp, {{[0-9]+}}($sp)
; PIC-FP: move $fp, $sp
; PIC-FP: addu $[[R1:[0-9]+]], $[[R0]], $25
; PIC-FP: .loc 1 2 3 prologue_end
; PIC-FP: lw $[[R2:[0-9]+]], %got($.str)($[[R1]])
%call = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i32 0, i32 0)), !dbg !10
ret void, !dbg !11
}
declare i32 @printf(i8*, ...)
attributes #0 = { nounwind }
!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!7, !8}
!llvm.ident = !{!9}
!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
!1 = !DIFile(filename: "test.c", directory: "/tmp")
!2 = !{}
!4 = distinct !DISubprogram(name: "hello_world", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2)
!5 = !DISubroutineType(types: !6)
!6 = !{null}
!7 = !{i32 2, !"Dwarf Version", i32 4}
!8 = !{i32 2, !"Debug Info Version", i32 3}
!9 = !{!"clang version 3.8.0"}
!10 = !DILocation(line: 2, column: 3, scope: !4)
!11 = !DILocation(line: 3, column: 1, scope: !4)

View File

@ -1,22 +0,0 @@
; RUN: llc -O0 -march=mips -mcpu=mips32r2 -filetype=asm < %s | FileCheck %s -check-prefix=CHECK-WORD
; RUN: llc -O0 -march=mips64 -mcpu=mips64r2 -filetype=asm < %s | FileCheck %s -check-prefix=CHECK-DWORD
@x = thread_local global i32 5, align 4, !dbg !0
; CHECK-WORD: .dtprelword x+32768
; CHECK-DWORD: .dtpreldword x+32768
!llvm.dbg.cu = !{!2}
!llvm.module.flags = !{!7, !8}
!llvm.ident = !{!9}
!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
!1 = distinct !DIGlobalVariable(name: "x", scope: !2, file: !3, line: 1, type: !6, isLocal: false, isDefinition: true)
!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang version 4.0.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5)
!3 = !DIFile(filename: "tls.c", directory: "/tmp")
!4 = !{}
!5 = !{!0}
!6 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
!7 = !{i32 2, !"Dwarf Version", i32 4}
!8 = !{i32 2, !"Debug Info Version", i32 3}
!9 = !{!"clang version 4.0.0"}