[llvm] r320176 - AMDGPU: Report Arg's Value name in metadata if kernel_arg_name metadata is not available
Konstantin Zhuravlyov via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 8 11:22:12 PST 2017
Author: kzhuravl
Date: Fri Dec 8 11:22:12 2017
New Revision: 320176
URL: http://llvm.org/viewvc/llvm-project?rev=320176&view=rev
Log:
AMDGPU: Report Arg's Value name in metadata if kernel_arg_name metadata is not available
Differential Revision: https://reviews.llvm.org/D40924
Modified:
llvm/trunk/lib/Target/AMDGPU/MCTargetDesc/AMDGPUHSAMetadataStreamer.cpp
llvm/trunk/test/CodeGen/AMDGPU/hsa-metadata-deduce-ro-arg.ll
llvm/trunk/test/CodeGen/AMDGPU/hsa-metadata-enqueu-kernel.ll
llvm/trunk/test/CodeGen/AMDGPU/hsa-metadata-from-llvm-ir-full.ll
llvm/trunk/test/CodeGen/AMDGPU/hsa-metadata-images.ll
Modified: llvm/trunk/lib/Target/AMDGPU/MCTargetDesc/AMDGPUHSAMetadataStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/MCTargetDesc/AMDGPUHSAMetadataStreamer.cpp?rev=320176&r1=320175&r2=320176&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/MCTargetDesc/AMDGPUHSAMetadataStreamer.cpp (original)
+++ llvm/trunk/lib/Target/AMDGPU/MCTargetDesc/AMDGPUHSAMetadataStreamer.cpp Fri Dec 8 11:22:12 2017
@@ -292,6 +292,8 @@ void MetadataStreamer::emitKernelArg(con
Node = Func->getMetadata("kernel_arg_name");
if (Node && ArgNo < Node->getNumOperands())
Name = cast<MDString>(Node->getOperand(ArgNo))->getString();
+ else if (Arg.hasName())
+ Name = Arg.getName();
StringRef TypeName;
Node = Func->getMetadata("kernel_arg_type");
Modified: llvm/trunk/test/CodeGen/AMDGPU/hsa-metadata-deduce-ro-arg.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AMDGPU/hsa-metadata-deduce-ro-arg.ll?rev=320176&r1=320175&r2=320176&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/AMDGPU/hsa-metadata-deduce-ro-arg.ll (original)
+++ llvm/trunk/test/CodeGen/AMDGPU/hsa-metadata-deduce-ro-arg.ll Fri Dec 8 11:22:12 2017
@@ -3,7 +3,8 @@
; CHECK: - Name: test_ro_arg
; CHECK-NEXT: SymbolName: 'test_ro_arg at kd'
; CHECK-NEXT: Args:
-; CHECK-NEXT: - TypeName: 'float*'
+; CHECK-NEXT: - Name: in
+; CHECK-NEXT: TypeName: 'float*'
; CHECK-NEXT: Size: 8
; CHECK-NEXT: Align: 8
; CHECK-NEXT: ValueKind: GlobalBuffer
@@ -12,7 +13,8 @@
; CHECK-NEXT: AccQual: ReadOnly
; CHECK-NEXT: IsConst: true
; CHECK-NEXT: IsRestrict: true
-; CHECK-NEXT: - TypeName: 'float*'
+; CHECK-NEXT: - Name: out
+; CHECK-NEXT: TypeName: 'float*'
; CHECK-NEXT: Size: 8
; CHECK-NEXT: Align: 8
; CHECK-NEXT: ValueKind: GlobalBuffer
Modified: llvm/trunk/test/CodeGen/AMDGPU/hsa-metadata-enqueu-kernel.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AMDGPU/hsa-metadata-enqueu-kernel.ll?rev=320176&r1=320175&r2=320176&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/AMDGPU/hsa-metadata-enqueu-kernel.ll (original)
+++ llvm/trunk/test/CodeGen/AMDGPU/hsa-metadata-enqueu-kernel.ll Fri Dec 8 11:22:12 2017
@@ -11,7 +11,8 @@
; CHECK-NEXT: Language: OpenCL C
; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
; CHECK-NEXT: Args:
-; CHECK-NEXT: - TypeName: char
+; CHECK-NEXT: - Name: a
+; CHECK-NEXT: TypeName: char
; CHECK-NEXT: Size: 1
; CHECK-NEXT: Align: 1
; CHECK-NEXT: ValueKind: ByValue
@@ -43,7 +44,8 @@ define amdgpu_kernel void @test_non_enqu
; CHECK-NEXT: Language: OpenCL C
; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
; CHECK-NEXT: Args:
-; CHECK-NEXT: - TypeName: char
+; CHECK-NEXT: - Name: a
+; CHECK-NEXT: TypeName: char
; CHECK-NEXT: Size: 1
; CHECK-NEXT: Align: 1
; CHECK-NEXT: ValueKind: ByValue
Modified: llvm/trunk/test/CodeGen/AMDGPU/hsa-metadata-from-llvm-ir-full.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AMDGPU/hsa-metadata-from-llvm-ir-full.ll?rev=320176&r1=320175&r2=320176&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/AMDGPU/hsa-metadata-from-llvm-ir-full.ll (original)
+++ llvm/trunk/test/CodeGen/AMDGPU/hsa-metadata-from-llvm-ir-full.ll Fri Dec 8 11:22:12 2017
@@ -28,7 +28,8 @@
; CHECK-NEXT: Language: OpenCL C
; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
; CHECK-NEXT: Args:
-; CHECK-NEXT: - TypeName: char
+; CHECK-NEXT: - Name: a
+; CHECK-NEXT: TypeName: char
; CHECK-NEXT: Size: 1
; CHECK-NEXT: Align: 1
; CHECK-NEXT: ValueKind: ByValue
@@ -64,7 +65,8 @@ define amdgpu_kernel void @test_char(i8
; CHECK-NEXT: Language: OpenCL C
; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
; CHECK-NEXT: Args:
-; CHECK-NEXT: - TypeName: ushort2
+; CHECK-NEXT: - Name: a
+; CHECK-NEXT: TypeName: ushort2
; CHECK-NEXT: Size: 4
; CHECK-NEXT: Align: 4
; CHECK-NEXT: ValueKind: ByValue
@@ -98,7 +100,8 @@ define amdgpu_kernel void @test_ushort2(
; CHECK-NEXT: Language: OpenCL C
; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
; CHECK-NEXT: Args:
-; CHECK-NEXT: - TypeName: int3
+; CHECK-NEXT: - Name: a
+; CHECK-NEXT: TypeName: int3
; CHECK-NEXT: Size: 16
; CHECK-NEXT: Align: 16
; CHECK-NEXT: ValueKind: ByValue
@@ -132,7 +135,8 @@ define amdgpu_kernel void @test_int3(<3
; CHECK-NEXT: Language: OpenCL C
; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
; CHECK-NEXT: Args:
-; CHECK-NEXT: - TypeName: ulong4
+; CHECK-NEXT: - Name: a
+; CHECK-NEXT: TypeName: ulong4
; CHECK-NEXT: Size: 32
; CHECK-NEXT: Align: 32
; CHECK-NEXT: ValueKind: ByValue
@@ -166,7 +170,8 @@ define amdgpu_kernel void @test_ulong4(<
; CHECK-NEXT: Language: OpenCL C
; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
; CHECK-NEXT: Args:
-; CHECK-NEXT: - TypeName: half8
+; CHECK-NEXT: - Name: a
+; CHECK-NEXT: TypeName: half8
; CHECK-NEXT: Size: 16
; CHECK-NEXT: Align: 16
; CHECK-NEXT: ValueKind: ByValue
@@ -200,7 +205,8 @@ define amdgpu_kernel void @test_half8(<8
; CHECK-NEXT: Language: OpenCL C
; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
; CHECK-NEXT: Args:
-; CHECK-NEXT: - TypeName: float16
+; CHECK-NEXT: - Name: a
+; CHECK-NEXT: TypeName: float16
; CHECK-NEXT: Size: 64
; CHECK-NEXT: Align: 64
; CHECK-NEXT: ValueKind: ByValue
@@ -234,7 +240,8 @@ define amdgpu_kernel void @test_float16(
; CHECK-NEXT: Language: OpenCL C
; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
; CHECK-NEXT: Args:
-; CHECK-NEXT: - TypeName: double16
+; CHECK-NEXT: - Name: a
+; CHECK-NEXT: TypeName: double16
; CHECK-NEXT: Size: 128
; CHECK-NEXT: Align: 128
; CHECK-NEXT: ValueKind: ByValue
@@ -268,7 +275,8 @@ define amdgpu_kernel void @test_double16
; CHECK-NEXT: Language: OpenCL C
; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
; CHECK-NEXT: Args:
-; CHECK-NEXT: - TypeName: 'int *'
+; CHECK-NEXT: - Name: a
+; CHECK-NEXT: TypeName: 'int *'
; CHECK-NEXT: Size: 8
; CHECK-NEXT: Align: 8
; CHECK-NEXT: ValueKind: GlobalBuffer
@@ -303,7 +311,8 @@ define amdgpu_kernel void @test_pointer(
; CHECK-NEXT: Language: OpenCL C
; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
; CHECK-NEXT: Args:
-; CHECK-NEXT: - TypeName: image2d_t
+; CHECK-NEXT: - Name: a
+; CHECK-NEXT: TypeName: image2d_t
; CHECK-NEXT: Size: 8
; CHECK-NEXT: Align: 8
; CHECK-NEXT: ValueKind: Image
@@ -338,7 +347,8 @@ define amdgpu_kernel void @test_image(%o
; CHECK-NEXT: Language: OpenCL C
; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
; CHECK-NEXT: Args:
-; CHECK-NEXT: - TypeName: sampler_t
+; CHECK-NEXT: - Name: a
+; CHECK-NEXT: TypeName: sampler_t
; CHECK-NEXT: Size: 4
; CHECK-NEXT: Align: 4
; CHECK-NEXT: ValueKind: Sampler
@@ -372,7 +382,8 @@ define amdgpu_kernel void @test_sampler(
; CHECK-NEXT: Language: OpenCL C
; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
; CHECK-NEXT: Args:
-; CHECK-NEXT: - TypeName: queue_t
+; CHECK-NEXT: - Name: a
+; CHECK-NEXT: TypeName: queue_t
; CHECK-NEXT: Size: 8
; CHECK-NEXT: Align: 8
; CHECK-NEXT: ValueKind: Queue
@@ -407,7 +418,8 @@ define amdgpu_kernel void @test_queue(%o
; CHECK-NEXT: Language: OpenCL C
; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
; CHECK-NEXT: Args:
-; CHECK-NEXT: - TypeName: struct A
+; CHECK-NEXT: - Name: a
+; CHECK-NEXT: TypeName: struct A
; CHECK-NEXT: Size: 4
; CHECK-NEXT: Align: 4
; CHECK-NEXT: ValueKind: GlobalBuffer
@@ -442,7 +454,8 @@ define amdgpu_kernel void @test_struct(%
; CHECK-NEXT: Language: OpenCL C
; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
; CHECK-NEXT: Args:
-; CHECK-NEXT: - TypeName: i128
+; CHECK-NEXT: - Name: a
+; CHECK-NEXT: TypeName: i128
; CHECK-NEXT: Size: 16
; CHECK-NEXT: Align: 8
; CHECK-NEXT: ValueKind: ByValue
@@ -476,19 +489,22 @@ define amdgpu_kernel void @test_i128(i12
; CHECK-NEXT: Language: OpenCL C
; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
; CHECK-NEXT: Args:
-; CHECK-NEXT: - TypeName: int
+; CHECK-NEXT: - Name: a
+; CHECK-NEXT: TypeName: int
; CHECK-NEXT: Size: 4
; CHECK-NEXT: Align: 4
; CHECK-NEXT: ValueKind: ByValue
; CHECK-NEXT: ValueType: I32
; CHECK-NEXT: AccQual: Default
-; CHECK-NEXT: - TypeName: short2
+; CHECK-NEXT: - Name: b
+; CHECK-NEXT: TypeName: short2
; CHECK-NEXT: Size: 4
; CHECK-NEXT: Align: 4
; CHECK-NEXT: ValueKind: ByValue
; CHECK-NEXT: ValueType: I16
; CHECK-NEXT: AccQual: Default
-; CHECK-NEXT: - TypeName: char3
+; CHECK-NEXT: - Name: c
+; CHECK-NEXT: TypeName: char3
; CHECK-NEXT: Size: 4
; CHECK-NEXT: Align: 4
; CHECK-NEXT: ValueKind: ByValue
@@ -522,21 +538,24 @@ define amdgpu_kernel void @test_multi_ar
; CHECK-NEXT: Language: OpenCL C
; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
; CHECK-NEXT: Args:
-; CHECK-NEXT: - TypeName: 'int *'
+; CHECK-NEXT: - Name: g
+; CHECK-NEXT: TypeName: 'int *'
; CHECK-NEXT: Size: 8
; CHECK-NEXT: Align: 8
; CHECK-NEXT: ValueKind: GlobalBuffer
; CHECK-NEXT: ValueType: I32
; CHECK-NEXT: AddrSpaceQual: Global
; CHECK-NEXT: AccQual: Default
-; CHECK-NEXT: - TypeName: 'int *'
+; CHECK-NEXT: - Name: c
+; CHECK-NEXT: TypeName: 'int *'
; CHECK-NEXT: Size: 8
; CHECK-NEXT: Align: 8
; CHECK-NEXT: ValueKind: GlobalBuffer
; CHECK-NEXT: ValueType: I32
; CHECK-NEXT: AddrSpaceQual: Constant
; CHECK-NEXT: AccQual: Default
-; CHECK-NEXT: - TypeName: 'int *'
+; CHECK-NEXT: - Name: l
+; CHECK-NEXT: TypeName: 'int *'
; CHECK-NEXT: Size: 4
; CHECK-NEXT: Align: 4
; CHECK-NEXT: ValueKind: DynamicSharedPointer
@@ -574,7 +593,8 @@ define amdgpu_kernel void @test_addr_spa
; CHECK-NEXT: Language: OpenCL C
; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
; CHECK-NEXT: Args:
-; CHECK-NEXT: - TypeName: 'int *'
+; CHECK-NEXT: - Name: a
+; CHECK-NEXT: TypeName: 'int *'
; CHECK-NEXT: Size: 8
; CHECK-NEXT: Align: 8
; CHECK-NEXT: ValueKind: GlobalBuffer
@@ -582,7 +602,8 @@ define amdgpu_kernel void @test_addr_spa
; CHECK-NEXT: AddrSpaceQual: Global
; CHECK-NEXT: AccQual: Default
; CHECK-NEXT: IsVolatile: true
-; CHECK-NEXT: - TypeName: 'int *'
+; CHECK-NEXT: - Name: b
+; CHECK-NEXT: TypeName: 'int *'
; CHECK-NEXT: Size: 8
; CHECK-NEXT: Align: 8
; CHECK-NEXT: ValueKind: GlobalBuffer
@@ -591,7 +612,8 @@ define amdgpu_kernel void @test_addr_spa
; CHECK-NEXT: AccQual: Default
; CHECK-NEXT: IsConst: true
; CHECK-NEXT: IsRestrict: true
-; CHECK-NEXT: - TypeName: 'int *'
+; CHECK-NEXT: - Name: c
+; CHECK-NEXT: TypeName: 'int *'
; CHECK-NEXT: Size: 8
; CHECK-NEXT: Align: 8
; CHECK-NEXT: ValueKind: Pipe
@@ -629,21 +651,24 @@ define amdgpu_kernel void @test_type_qua
; CHECK-NEXT: Language: OpenCL C
; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
; CHECK-NEXT: Args:
-; CHECK-NEXT: - TypeName: image1d_t
+; CHECK-NEXT: - Name: ro
+; CHECK-NEXT: TypeName: image1d_t
; CHECK-NEXT: Size: 8
; CHECK-NEXT: Align: 8
; CHECK-NEXT: ValueKind: Image
; CHECK-NEXT: ValueType: Struct
; CHECK-NEXT: AddrSpaceQual: Global
; CHECK-NEXT: AccQual: ReadOnly
-; CHECK-NEXT: - TypeName: image2d_t
+; CHECK-NEXT: - Name: wo
+; CHECK-NEXT: TypeName: image2d_t
; CHECK-NEXT: Size: 8
; CHECK-NEXT: Align: 8
; CHECK-NEXT: ValueKind: Image
; CHECK-NEXT: ValueType: Struct
; CHECK-NEXT: AddrSpaceQual: Global
; CHECK-NEXT: AccQual: WriteOnly
-; CHECK-NEXT: - TypeName: image3d_t
+; CHECK-NEXT: - Name: rw
+; CHECK-NEXT: TypeName: image3d_t
; CHECK-NEXT: Size: 8
; CHECK-NEXT: Align: 8
; CHECK-NEXT: ValueKind: Image
@@ -682,7 +707,8 @@ define amdgpu_kernel void @test_access_q
; CHECK-NEXT: Attrs:
; CHECK-NEXT: VecTypeHint: half
; CHECK-NEXT: Args:
-; CHECK-NEXT: - TypeName: int
+; CHECK-NEXT: - Name: a
+; CHECK-NEXT: TypeName: int
; CHECK-NEXT: Size: 4
; CHECK-NEXT: Align: 4
; CHECK-NEXT: ValueKind: ByValue
@@ -718,7 +744,8 @@ define amdgpu_kernel void @test_vec_type
; CHECK-NEXT: Attrs:
; CHECK-NEXT: VecTypeHint: float
; CHECK-NEXT: Args:
-; CHECK-NEXT: - TypeName: int
+; CHECK-NEXT: - Name: a
+; CHECK-NEXT: TypeName: int
; CHECK-NEXT: Size: 4
; CHECK-NEXT: Align: 4
; CHECK-NEXT: ValueKind: ByValue
@@ -754,7 +781,8 @@ define amdgpu_kernel void @test_vec_type
; CHECK-NEXT: Attrs:
; CHECK-NEXT: VecTypeHint: double
; CHECK-NEXT: Args:
-; CHECK-NEXT: - TypeName: int
+; CHECK-NEXT: - Name: a
+; CHECK-NEXT: TypeName: int
; CHECK-NEXT: Size: 4
; CHECK-NEXT: Align: 4
; CHECK-NEXT: ValueKind: ByValue
@@ -790,7 +818,8 @@ define amdgpu_kernel void @test_vec_type
; CHECK-NEXT: Attrs:
; CHECK-NEXT: VecTypeHint: char
; CHECK-NEXT: Args:
-; CHECK-NEXT: - TypeName: int
+; CHECK-NEXT: - Name: a
+; CHECK-NEXT: TypeName: int
; CHECK-NEXT: Size: 4
; CHECK-NEXT: Align: 4
; CHECK-NEXT: ValueKind: ByValue
@@ -826,7 +855,8 @@ define amdgpu_kernel void @test_vec_type
; CHECK-NEXT: Attrs:
; CHECK-NEXT: VecTypeHint: short
; CHECK-NEXT: Args:
-; CHECK-NEXT: - TypeName: int
+; CHECK-NEXT: - Name: a
+; CHECK-NEXT: TypeName: int
; CHECK-NEXT: Size: 4
; CHECK-NEXT: Align: 4
; CHECK-NEXT: ValueKind: ByValue
@@ -862,7 +892,8 @@ define amdgpu_kernel void @test_vec_type
; CHECK-NEXT: Attrs:
; CHECK-NEXT: VecTypeHint: long
; CHECK-NEXT: Args:
-; CHECK-NEXT: - TypeName: int
+; CHECK-NEXT: - Name: a
+; CHECK-NEXT: TypeName: int
; CHECK-NEXT: Size: 4
; CHECK-NEXT: Align: 4
; CHECK-NEXT: ValueKind: ByValue
@@ -898,7 +929,8 @@ define amdgpu_kernel void @test_vec_type
; CHECK-NEXT: Attrs:
; CHECK-NEXT: VecTypeHint: unknown
; CHECK-NEXT: Args:
-; CHECK-NEXT: - TypeName: int
+; CHECK-NEXT: - Name: a
+; CHECK-NEXT: TypeName: int
; CHECK-NEXT: Size: 4
; CHECK-NEXT: Align: 4
; CHECK-NEXT: ValueKind: ByValue
@@ -935,7 +967,8 @@ define amdgpu_kernel void @test_vec_type
; CHECK-NEXT: ReqdWorkGroupSize: [ 1, 2, 4 ]
; CHECK-NEXT: VecTypeHint: int
; CHECK-NEXT: Args:
-; CHECK-NEXT: - TypeName: int
+; CHECK-NEXT: - Name: a
+; CHECK-NEXT: TypeName: int
; CHECK-NEXT: Size: 4
; CHECK-NEXT: Align: 4
; CHECK-NEXT: ValueKind: ByValue
@@ -973,7 +1006,8 @@ define amdgpu_kernel void @test_reqd_wgs
; CHECK-NEXT: WorkGroupSizeHint: [ 8, 16, 32 ]
; CHECK-NEXT: VecTypeHint: uint4
; CHECK-NEXT: Args:
-; CHECK-NEXT: - TypeName: int
+; CHECK-NEXT: - Name: a
+; CHECK-NEXT: TypeName: int
; CHECK-NEXT: Size: 4
; CHECK-NEXT: Align: 4
; CHECK-NEXT: ValueKind: ByValue
@@ -1008,7 +1042,8 @@ define amdgpu_kernel void @test_wgs_hint
; CHECK-NEXT: Language: OpenCL C
; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
; CHECK-NEXT: Args:
-; CHECK-NEXT: - TypeName: 'int **'
+; CHECK-NEXT: - Name: a
+; CHECK-NEXT: TypeName: 'int **'
; CHECK-NEXT: Size: 8
; CHECK-NEXT: Align: 8
; CHECK-NEXT: ValueKind: GlobalBuffer
@@ -1043,7 +1078,8 @@ define amdgpu_kernel void @test_arg_ptr_
; CHECK-NEXT: Language: OpenCL C
; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
; CHECK-NEXT: Args:
-; CHECK-NEXT: - TypeName: struct B
+; CHECK-NEXT: - Name: a
+; CHECK-NEXT: TypeName: struct B
; CHECK-NEXT: Size: 4
; CHECK-NEXT: Align: 4
; CHECK-NEXT: ValueKind: GlobalBuffer
@@ -1078,7 +1114,8 @@ define amdgpu_kernel void @test_arg_stru
; CHECK-NEXT: Language: OpenCL C
; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
; CHECK-NEXT: Args:
-; CHECK-NEXT: - TypeName: 'global int* __attribute__((ext_vector_type(2)))'
+; CHECK-NEXT: - Name: a
+; CHECK-NEXT: TypeName: 'global int* __attribute__((ext_vector_type(2)))'
; CHECK-NEXT: Size: 16
; CHECK-NEXT: Align: 16
; CHECK-NEXT: ValueKind: ByValue
@@ -1112,7 +1149,8 @@ define amdgpu_kernel void @test_arg_vect
; CHECK-NEXT: Language: OpenCL C
; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
; CHECK-NEXT: Args:
-; CHECK-NEXT: - TypeName: clk_event_t
+; CHECK-NEXT: - Name: a
+; CHECK-NEXT: TypeName: clk_event_t
; CHECK-NEXT: Size: 8
; CHECK-NEXT: Align: 8
; CHECK-NEXT: ValueKind: GlobalBuffer
@@ -1148,14 +1186,16 @@ define amdgpu_kernel void @test_arg_unkn
; CHECK-NEXT: Language: OpenCL C
; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
; CHECK-NEXT: Args:
-; CHECK-NEXT: - TypeName: 'long *'
+; CHECK-NEXT: - Name: a
+; CHECK-NEXT: TypeName: 'long *'
; CHECK-NEXT: Size: 8
; CHECK-NEXT: Align: 8
; CHECK-NEXT: ValueKind: GlobalBuffer
; CHECK-NEXT: ValueType: I64
; CHECK-NEXT: AddrSpaceQual: Global
; CHECK-NEXT: AccQual: Default
-; CHECK-NEXT: - TypeName: 'char *'
+; CHECK-NEXT: - Name: b
+; CHECK-NEXT: TypeName: 'char *'
; CHECK-NEXT: Size: 4
; CHECK-NEXT: Align: 4
; CHECK-NEXT: ValueKind: DynamicSharedPointer
@@ -1163,7 +1203,8 @@ define amdgpu_kernel void @test_arg_unkn
; CHECK-NEXT: PointeeAlign: 1
; CHECK-NEXT: AddrSpaceQual: Local
; CHECK-NEXT: AccQual: Default
-; CHECK-NEXT: - TypeName: 'char2 *'
+; CHECK-NEXT: - Name: c
+; CHECK-NEXT: TypeName: 'char2 *'
; CHECK-NEXT: Size: 4
; CHECK-NEXT: Align: 4
; CHECK-NEXT: ValueKind: DynamicSharedPointer
@@ -1171,7 +1212,8 @@ define amdgpu_kernel void @test_arg_unkn
; CHECK-NEXT: PointeeAlign: 2
; CHECK-NEXT: AddrSpaceQual: Local
; CHECK-NEXT: AccQual: Default
-; CHECK-NEXT: - TypeName: 'char3 *'
+; CHECK-NEXT: - Name: d
+; CHECK-NEXT: TypeName: 'char3 *'
; CHECK-NEXT: Size: 4
; CHECK-NEXT: Align: 4
; CHECK-NEXT: ValueKind: DynamicSharedPointer
@@ -1179,7 +1221,8 @@ define amdgpu_kernel void @test_arg_unkn
; CHECK-NEXT: PointeeAlign: 4
; CHECK-NEXT: AddrSpaceQual: Local
; CHECK-NEXT: AccQual: Default
-; CHECK-NEXT: - TypeName: 'char4 *'
+; CHECK-NEXT: - Name: e
+; CHECK-NEXT: TypeName: 'char4 *'
; CHECK-NEXT: Size: 4
; CHECK-NEXT: Align: 4
; CHECK-NEXT: ValueKind: DynamicSharedPointer
@@ -1187,7 +1230,8 @@ define amdgpu_kernel void @test_arg_unkn
; CHECK-NEXT: PointeeAlign: 4
; CHECK-NEXT: AddrSpaceQual: Local
; CHECK-NEXT: AccQual: Default
-; CHECK-NEXT: - TypeName: 'char8 *'
+; CHECK-NEXT: - Name: f
+; CHECK-NEXT: TypeName: 'char8 *'
; CHECK-NEXT: Size: 4
; CHECK-NEXT: Align: 4
; CHECK-NEXT: ValueKind: DynamicSharedPointer
@@ -1195,7 +1239,8 @@ define amdgpu_kernel void @test_arg_unkn
; CHECK-NEXT: PointeeAlign: 8
; CHECK-NEXT: AddrSpaceQual: Local
; CHECK-NEXT: AccQual: Default
-; CHECK-NEXT: - TypeName: 'char16 *'
+; CHECK-NEXT: - Name: g
+; CHECK-NEXT: TypeName: 'char16 *'
; CHECK-NEXT: Size: 4
; CHECK-NEXT: Align: 4
; CHECK-NEXT: ValueKind: DynamicSharedPointer
@@ -1239,7 +1284,8 @@ define amdgpu_kernel void @test_pointee_
; CHECK-NEXT: Attrs:
; CHECK-NEXT: RuntimeHandle: __test_block_invoke_kernel_runtime_handle
; CHECK-NEXT: Args:
-; CHECK-NEXT: - TypeName: __block_literal
+; CHECK-NEXT: - Name: arg
+; CHECK-NEXT: TypeName: __block_literal
; CHECK-NEXT: Size: 25
; CHECK-NEXT: Align: 1
; CHECK-NEXT: ValueKind: ByValue
@@ -1274,7 +1320,8 @@ define amdgpu_kernel void @__test_block_
; CHECK-NEXT: Language: OpenCL C
; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
; CHECK-NEXT: Args:
-; CHECK-NEXT: - TypeName: char
+; CHECK-NEXT: - Name: a
+; CHECK-NEXT: TypeName: char
; CHECK-NEXT: Size: 1
; CHECK-NEXT: Align: 1
; CHECK-NEXT: ValueKind: ByValue
Modified: llvm/trunk/test/CodeGen/AMDGPU/hsa-metadata-images.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AMDGPU/hsa-metadata-images.ll?rev=320176&r1=320175&r2=320176&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/AMDGPU/hsa-metadata-images.ll (original)
+++ llvm/trunk/test/CodeGen/AMDGPU/hsa-metadata-images.ll Fri Dec 8 11:22:12 2017
@@ -22,40 +22,52 @@
; CHECK: - Name: test
; CHECK: SymbolName: 'test at kd'
; CHECK: Args:
-; CHECK: - TypeName: image1d_t
+; CHECK: - Name: a
+; CHECK: TypeName: image1d_t
; CHECK: Size: 8
; CHECK: ValueKind: Image
-; CHECK: - TypeName: image1d_array_t
+; CHECK: - Name: b
+; CHECK: TypeName: image1d_array_t
; CHECK: Size: 8
; CHECK: ValueKind: Image
-; CHECK: - TypeName: image1d_buffer_t
+; CHECK: - Name: c
+; CHECK: TypeName: image1d_buffer_t
; CHECK: Size: 8
; CHECK: ValueKind: Image
-; CHECK: - TypeName: image2d_t
+; CHECK: - Name: d
+; CHECK: TypeName: image2d_t
; CHECK: Size: 8
; CHECK: ValueKind: Image
-; CHECK: - TypeName: image2d_array_t
+; CHECK: - Name: e
+; CHECK: TypeName: image2d_array_t
; CHECK: Size: 8
; CHECK: ValueKind: Image
-; CHECK: - TypeName: image2d_array_depth_t
+; CHECK: - Name: f
+; CHECK: TypeName: image2d_array_depth_t
; CHECK: Size: 8
; CHECK: ValueKind: Image
-; CHECK: - TypeName: image2d_array_msaa_t
+; CHECK: - Name: g
+; CHECK: TypeName: image2d_array_msaa_t
; CHECK: Size: 8
; CHECK: ValueKind: Image
-; CHECK: - TypeName: image2d_array_msaa_depth_t
+; CHECK: - Name: h
+; CHECK: TypeName: image2d_array_msaa_depth_t
; CHECK: Size: 8
; CHECK: ValueKind: Image
-; CHECK: - TypeName: image2d_depth_t
+; CHECK: - Name: i
+; CHECK: TypeName: image2d_depth_t
; CHECK: Size: 8
; CHECK: ValueKind: Image
-; CHECK: - TypeName: image2d_msaa_t
+; CHECK: - Name: j
+; CHECK: TypeName: image2d_msaa_t
; CHECK: Size: 8
; CHECK: ValueKind: Image
-; CHECK: - TypeName: image2d_msaa_depth_t
+; CHECK: - Name: k
+; CHECK: TypeName: image2d_msaa_depth_t
; CHECK: Size: 8
; CHECK: ValueKind: Image
-; CHECK: - TypeName: image3d_t
+; CHECK: - Name: l
+; CHECK: TypeName: image3d_t
; CHECK: Size: 8
; CHECK: ValueKind: Image
define amdgpu_kernel void @test(%opencl.image1d_t addrspace(1)* %a,
More information about the llvm-commits
mailing list