diff options
author | Paul Robinson <paul.robinson@sony.com> | 2017-04-20 19:16:51 +0000 |
---|---|---|
committer | Paul Robinson <paul.robinson@sony.com> | 2017-04-20 19:16:51 +0000 |
commit | 70b34533c22703b51a95598afceb58a0257d434b (patch) | |
tree | 9736c54d2e6d8f90923d10ba1c5a8b35661ed9d6 /llvm/test/DebugInfo/AMDGPU | |
parent | 8431e996d323bbafda2cad67a3d6672d69e2bef8 (diff) | |
download | bcm5719-llvm-70b34533c22703b51a95598afceb58a0257d434b.tar.gz bcm5719-llvm-70b34533c22703b51a95598afceb58a0257d434b.zip |
[DWARF] Versioning for DWARF constants; verify FORMs
Associate the version-when-defined with definitions of standard DWARF
constants. Identify the "vendor" for DWARF extensions.
Use this information to verify FORMs in .debug_abbrev are defined as
of the DWARF version specified in the associated unit.
Removed two tests that had specified DWARF v1 (which essentially does
not exist).
Differential Revision: http://reviews.llvm.org/D30785
llvm-svn: 300875
Diffstat (limited to 'llvm/test/DebugInfo/AMDGPU')
-rw-r--r-- | llvm/test/DebugInfo/AMDGPU/pointer-address-space-dwarf-v1.ll | 70 | ||||
-rw-r--r-- | llvm/test/DebugInfo/AMDGPU/variable-locations-dwarf-v1.ll | 92 |
2 files changed, 0 insertions, 162 deletions
diff --git a/llvm/test/DebugInfo/AMDGPU/pointer-address-space-dwarf-v1.ll b/llvm/test/DebugInfo/AMDGPU/pointer-address-space-dwarf-v1.ll deleted file mode 100644 index cbd5e7688a5..00000000000 --- a/llvm/test/DebugInfo/AMDGPU/pointer-address-space-dwarf-v1.ll +++ /dev/null @@ -1,70 +0,0 @@ -; RUN: llc -O0 -mtriple=amdgcn--amdhsa -mcpu=fiji -verify-machineinstrs -filetype=obj < %s | llvm-dwarfdump -debug-dump=info - | FileCheck %s - -; LLVM IR generated with the following command and OpenCL source: -; -; $clang -cl-std=CL2.0 -g -O0 -target amdgcn-amd-amdhsa -S -emit-llvm <path-to-file> -; -; kernel void kernel1() { -; global int *FuncVar0 = 0; -; constant int *FuncVar1 = 0; -; local int *FuncVar2 = 0; -; private int *FuncVar3 = 0; -; int *FuncVar4 = 0; -; } - -; DW_AT_address_class is available since Dwarf Version 2. -; CHECK-NOT: DW_AT_address_class - -declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 - -define amdgpu_kernel void @kernel1() #0 !dbg !7 { -entry: - %FuncVar0 = alloca i32 addrspace(1)*, align 4 - %FuncVar1 = alloca i32 addrspace(2)*, align 4 - %FuncVar2 = alloca i32 addrspace(3)*, align 4 - %FuncVar3 = alloca i32*, align 4 - %FuncVar4 = alloca i32 addrspace(4)*, align 4 - call void @llvm.dbg.declare(metadata i32 addrspace(1)** %FuncVar0, metadata !10, metadata !13), !dbg !14 - store i32 addrspace(1)* null, i32 addrspace(1)** %FuncVar0, align 4, !dbg !14 - call void @llvm.dbg.declare(metadata i32 addrspace(2)** %FuncVar1, metadata !15, metadata !13), !dbg !16 - store i32 addrspace(2)* null, i32 addrspace(2)** %FuncVar1, align 4, !dbg !16 - call void @llvm.dbg.declare(metadata i32 addrspace(3)** %FuncVar2, metadata !17, metadata !13), !dbg !19 - store i32 addrspace(3)* addrspacecast (i32 addrspace(4)* null to i32 addrspace(3)*), i32 addrspace(3)** %FuncVar2, align 4, !dbg !19 - call void @llvm.dbg.declare(metadata i32** %FuncVar3, metadata !20, metadata !13), !dbg !22 - store i32* addrspacecast (i32 addrspace(4)* null to i32*), i32** %FuncVar3, align 4, !dbg !22 - call void @llvm.dbg.declare(metadata i32 addrspace(4)** %FuncVar4, metadata !23, metadata !13), !dbg !24 - store i32 addrspace(4)* null, i32 addrspace(4)** %FuncVar4, align 4, !dbg !24 - ret void, !dbg !25 -} - -!llvm.dbg.cu = !{!0} -!opencl.ocl.version = !{!3} -!llvm.module.flags = !{!4, !5} -!llvm.ident = !{!6} - -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) -!1 = !DIFile(filename: "pointer-address-space-dwarf-v1.cl", directory: "/some/random/directory") -!2 = !{} -!3 = !{i32 2, i32 0} -!4 = !{i32 2, !"Dwarf Version", i32 1} -!5 = !{i32 2, !"Debug Info Version", i32 3} -!6 = !{!""} -!7 = distinct !DISubprogram(name: "kernel1", scope: !1, file: !1, line: 1, type: !8, isLocal: false, isDefinition: true, scopeLine: 1, isOptimized: false, unit: !0, variables: !2) -!8 = !DISubroutineType(types: !9) -!9 = !{null} -!10 = !DILocalVariable(name: "FuncVar0", scope: !7, file: !1, line: 2, type: !11) -!11 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !12, size: 64) -!12 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -!13 = !DIExpression() -!14 = !DILocation(line: 2, column: 15, scope: !7) -!15 = !DILocalVariable(name: "FuncVar1", scope: !7, file: !1, line: 3, type: !11) -!16 = !DILocation(line: 3, column: 17, scope: !7) -!17 = !DILocalVariable(name: "FuncVar2", scope: !7, file: !1, line: 4, type: !18) -!18 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !12, size: 32, dwarfAddressSpace: 2) -!19 = !DILocation(line: 4, column: 14, scope: !7) -!20 = !DILocalVariable(name: "FuncVar3", scope: !7, file: !1, line: 5, type: !21) -!21 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !12, size: 32, dwarfAddressSpace: 1) -!22 = !DILocation(line: 5, column: 16, scope: !7) -!23 = !DILocalVariable(name: "FuncVar4", scope: !7, file: !1, line: 6, type: !11) -!24 = !DILocation(line: 6, column: 8, scope: !7) -!25 = !DILocation(line: 7, column: 1, scope: !7) diff --git a/llvm/test/DebugInfo/AMDGPU/variable-locations-dwarf-v1.ll b/llvm/test/DebugInfo/AMDGPU/variable-locations-dwarf-v1.ll deleted file mode 100644 index d04a8eb7465..00000000000 --- a/llvm/test/DebugInfo/AMDGPU/variable-locations-dwarf-v1.ll +++ /dev/null @@ -1,92 +0,0 @@ -; RUN: llc -O0 -mtriple=amdgcn-amd-amdhsa -mcpu=fiji -verify-machineinstrs -filetype=obj < %s | llvm-dwarfdump -debug-dump=info - | FileCheck %s - -; LLVM IR generated with the following command and OpenCL source: -; -; $clang -cl-std=CL2.0 -g -O0 -target amdgcn-amd-amdhsa -S -emit-llvm <path-to-file> -; -; global int GlobA; -; global int GlobB; -; -; kernel void kernel1(unsigned int ArgN, global int *ArgA, global int *ArgB) { -; ArgA[ArgN] += ArgB[ArgN]; -; } - -declare void @llvm.dbg.declare(metadata, metadata, metadata) - -; CHECK-NOT: DW_AT_location [DW_FORM_block1] (<0x05> 03 00 00 00 00 ) -@GlobA = common addrspace(1) global i32 0, align 4, !dbg !0 -; CHECK-NOT: DW_AT_location [DW_FORM_block1] (<0x05> 03 00 00 00 00 ) -@GlobB = common addrspace(1) global i32 0, align 4, !dbg !6 - -define amdgpu_kernel void @kernel1( -; CHECK-NOT: DW_AT_location [DW_FORM_block1] (<0x06> 91 04 10 01 16 18 ) - i32 %ArgN, -; CHECK-NOT: DW_AT_location [DW_FORM_block1] (<0x06> 91 08 10 01 16 18 ) - i32 addrspace(1)* %ArgA, -; CHECK-NOT: DW_AT_location [DW_FORM_block1] (<0x06> 91 10 10 01 16 18 ) - i32 addrspace(1)* %ArgB) !dbg !13 { -entry: - %ArgN.addr = alloca i32, align 4 - %ArgA.addr = alloca i32 addrspace(1)*, align 4 - %ArgB.addr = alloca i32 addrspace(1)*, align 4 - store i32 %ArgN, i32* %ArgN.addr, align 4 - call void @llvm.dbg.declare(metadata i32* %ArgN.addr, metadata !22, metadata !23), !dbg !24 - store i32 addrspace(1)* %ArgA, i32 addrspace(1)** %ArgA.addr, align 4 - call void @llvm.dbg.declare(metadata i32 addrspace(1)** %ArgA.addr, metadata !25, metadata !23), !dbg !26 - store i32 addrspace(1)* %ArgB, i32 addrspace(1)** %ArgB.addr, align 4 - call void @llvm.dbg.declare(metadata i32 addrspace(1)** %ArgB.addr, metadata !27, metadata !23), !dbg !28 - %0 = load i32 addrspace(1)*, i32 addrspace(1)** %ArgB.addr, align 4, !dbg !29 - %1 = load i32, i32* %ArgN.addr, align 4, !dbg !30 - %idxprom = zext i32 %1 to i64, !dbg !29 - %arrayidx = getelementptr inbounds i32, i32 addrspace(1)* %0, i64 %idxprom, !dbg !29 - %2 = load i32, i32 addrspace(1)* %arrayidx, align 4, !dbg !29 - %3 = load i32 addrspace(1)*, i32 addrspace(1)** %ArgA.addr, align 4, !dbg !31 - %4 = load i32, i32* %ArgN.addr, align 4, !dbg !32 - %idxprom1 = zext i32 %4 to i64, !dbg !31 - %arrayidx2 = getelementptr inbounds i32, i32 addrspace(1)* %3, i64 %idxprom1, !dbg !31 - %5 = load i32, i32 addrspace(1)* %arrayidx2, align 4, !dbg !33 - %add = add nsw i32 %5, %2, !dbg !33 - store i32 %add, i32 addrspace(1)* %arrayidx2, align 4, !dbg !33 - ret void, !dbg !34 -} - -!llvm.dbg.cu = !{!2} -!opencl.ocl.version = !{!9} -!llvm.module.flags = !{!10, !11} -!llvm.ident = !{!12} - -!0 = !DIGlobalVariableExpression(var: !1) -!1 = distinct !DIGlobalVariable(name: "GlobA", scope: !2, file: !3, line: 1, type: !8, isLocal: false, isDefinition: true) -!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang version 5.0.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5) -!3 = !DIFile(filename: "variable-locations-dwarf-v1.cl", directory: "/some/random/directory") -!4 = !{} -!5 = !{!0, !6} -!6 = !DIGlobalVariableExpression(var: !7) -!7 = distinct !DIGlobalVariable(name: "GlobB", scope: !2, file: !3, line: 2, type: !8, isLocal: false, isDefinition: true) -!8 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -!9 = !{i32 2, i32 0} -!10 = !{i32 2, !"Dwarf Version", i32 1} -!11 = !{i32 2, !"Debug Info Version", i32 3} -!12 = !{!"clang version 5.0.0"} -!13 = distinct !DISubprogram(name: "kernel1", scope: !3, file: !3, line: 4, type: !14, isLocal: false, isDefinition: true, scopeLine: 4, flags: DIFlagPrototyped, isOptimized: false, unit: !2, variables: !4) -!14 = !DISubroutineType(types: !15) -!15 = !{null, !16, !17, !17} -!16 = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned) -!17 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !8, size: 64) -!18 = !{i32 0, i32 1, i32 1} -!19 = !{!"none", !"none", !"none"} -!20 = !{!"uint", !"int*", !"int*"} -!21 = !{!"", !"", !""} -!22 = !DILocalVariable(name: "ArgN", arg: 1, scope: !13, file: !3, line: 4, type: !16) -!23 = !DIExpression(DW_OP_constu, 1, DW_OP_swap, DW_OP_xderef) -!24 = !DILocation(line: 4, column: 34, scope: !13) -!25 = !DILocalVariable(name: "ArgA", arg: 2, scope: !13, file: !3, line: 4, type: !17) -!26 = !DILocation(line: 4, column: 52, scope: !13) -!27 = !DILocalVariable(name: "ArgB", arg: 3, scope: !13, file: !3, line: 4, type: !17) -!28 = !DILocation(line: 4, column: 70, scope: !13) -!29 = !DILocation(line: 5, column: 17, scope: !13) -!30 = !DILocation(line: 5, column: 22, scope: !13) -!31 = !DILocation(line: 5, column: 3, scope: !13) -!32 = !DILocation(line: 5, column: 8, scope: !13) -!33 = !DILocation(line: 5, column: 14, scope: !13) -!34 = !DILocation(line: 6, column: 1, scope: !13) |