Revert "[AMDGPU] Kernel arg metadata: added support for "__hip_texture" type."

This reverts commit r365073.

This is crashing, and is improperly relying on IR type names.

llvm-svn: 365087
This commit is contained in:
Matt Arsenault 2019-07-03 21:34:34 +00:00
parent 667ca68bde
commit c96c174557
3 changed files with 0 additions and 34 deletions

View File

@ -104,11 +104,6 @@ ValueKind MetadataStreamerV2::getValueKind(Type *Ty, StringRef TypeQual,
if (TypeQual.find("pipe") != StringRef::npos)
return ValueKind::Pipe;
if (isa<PointerType>(Ty) && Ty->getPointerElementType()->isStructTy() &&
Ty->getPointerElementType()->getStructName() == "struct.__hip_texture") {
return ValueKind::Image;
}
return StringSwitch<ValueKind>(BaseTypeName)
.Case("image1d_t", ValueKind::Image)
.Case("image1d_array_t", ValueKind::Image)
@ -546,11 +541,6 @@ StringRef MetadataStreamerV3::getValueKind(Type *Ty, StringRef TypeQual,
if (TypeQual.find("pipe") != StringRef::npos)
return "pipe";
if (isa<PointerType>(Ty) && Ty->getPointerElementType()->isStructTy() &&
Ty->getPointerElementType()->getStructName() == "struct.__hip_texture") {
return "image";
}
return StringSwitch<StringRef>(BaseTypeName)
.Case("image1d_t", "image")
.Case("image1d_array_t", "image")

View File

@ -13,7 +13,6 @@
%opencl.pipe_t = type opaque
%struct.B = type { i32 addrspace(1)*}
%opencl.clk_event_t = type opaque
%struct.__hip_texture = type opaque
@__test_block_invoke_kernel_runtime_handle = external addrspace(1) externally_initialized constant i8 addrspace(1)*
@ -1497,18 +1496,6 @@ define amdgpu_kernel void @unknown_addrspace_kernarg(i32 addrspace(12345)* %ptr)
ret void
}
; CHECK: - .args:
; CHECK-NEXT: - .address_space: generic
; CHECK-NEXT: .offset: 0
; CHECK-NEXT: .size: 8
; CHECK-NEXT: .value_kind: image
; CHECK-NEXT: .value_type: struct
; CHECK: .name: _Z5EmptyP13__hip_texture
; CHECK: .symbol: _Z5EmptyP13__hip_texture.kd
define protected amdgpu_kernel void @_Z5EmptyP13__hip_texture(%struct.__hip_texture* nocapture) local_unnamed_addr #1 {
ret void
}
; CHECK: amdhsa.printf:
; CHECK-NEXT: - '1:1:4:%d\n'
; CHECK-NEXT: - '2:1:8:%g\n'

View File

@ -13,7 +13,6 @@
%opencl.pipe_t = type opaque
%struct.B = type { i32 addrspace(1)*}
%opencl.clk_event_t = type opaque
%struct.__hip_texture = type opaque
@__test_block_invoke_kernel_runtime_handle = external addrspace(1) externally_initialized constant i8 addrspace(1)*
@ -1485,16 +1484,6 @@ define amdgpu_kernel void @unknown_addrspace_kernarg(i32 addrspace(12345)* %ptr)
ret void
}
; CHECK: - Name: _Z5EmptyP13__hip_texture
; CHECK: Args:
; CHECK-NEXT: - Size: 8
; CHECK-NEXT: Align: 8
; CHECK-NEXT: ValueKind: Image
; CHECK-NEXT: ValueType: Struct
define protected amdgpu_kernel void @_Z5EmptyP13__hip_texture(%struct.__hip_texture* nocapture) local_unnamed_addr #1 {
ret void
}
attributes #0 = { "amdgpu-implicitarg-num-bytes"="48" }
attributes #1 = { "amdgpu-implicitarg-num-bytes"="48" "runtime-handle"="__test_block_invoke_kernel_runtime_handle" }
attributes #2 = { "amdgpu-implicitarg-num-bytes"="48" "calls-enqueue-kernel" }