@@ -690,9 +690,7 @@ SPIRVType *SPIRVGlobalRegistry::createSPIRVType(
690
690
return getOpTypeArray (Ty->getArrayNumElements (), El, MIRBuilder, EmitIR);
691
691
}
692
692
if (auto SType = dyn_cast<StructType>(Ty)) {
693
- if (SType->isOpaque ())
694
- return getOpTypeOpaque (SType, MIRBuilder);
695
- return getOpTypeStruct (SType, MIRBuilder, EmitIR);
693
+ return getOpTypeOpaque (SType, MIRBuilder);
696
694
}
697
695
if (auto FType = dyn_cast<FunctionType>(Ty)) {
698
696
SPIRVType *RetTy = findSPIRVType (FType->getReturnType (), MIRBuilder);
@@ -707,12 +705,7 @@ SPIRVType *SPIRVGlobalRegistry::createSPIRVType(
707
705
// At the moment, all opaque pointers correspond to i8 element type.
708
706
// TODO: change the implementation once opaque pointers are supported
709
707
// in the SPIR-V specification.
710
- if (PType->isOpaque ())
711
- SpvElementType = getOrCreateSPIRVIntegerType (8 , MIRBuilder);
712
- else
713
- SpvElementType =
714
- findSPIRVType (PType->getNonOpaquePointerElementType (), MIRBuilder,
715
- SPIRV::AccessQualifier::ReadWrite, EmitIR);
708
+ SpvElementType = getOrCreateSPIRVIntegerType (8 , MIRBuilder);
716
709
auto SC = addressSpaceToStorageClass (PType->getAddressSpace ());
717
710
// Null pointer means we have a loop in type definitions, make and
718
711
// return corresponding OpTypeForwardPointer.
0 commit comments