@@ -690,9 +690,7 @@ SPIRVType *SPIRVGlobalRegistry::createSPIRVType(
690690 return getOpTypeArray (Ty->getArrayNumElements (), El, MIRBuilder, EmitIR);
691691 }
692692 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);
696694 }
697695 if (auto FType = dyn_cast<FunctionType>(Ty)) {
698696 SPIRVType *RetTy = findSPIRVType (FType->getReturnType (), MIRBuilder);
@@ -707,12 +705,7 @@ SPIRVType *SPIRVGlobalRegistry::createSPIRVType(
707705 // At the moment, all opaque pointers correspond to i8 element type.
708706 // TODO: change the implementation once opaque pointers are supported
709707 // 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);
716709 auto SC = addressSpaceToStorageClass (PType->getAddressSpace ());
717710 // Null pointer means we have a loop in type definitions, make and
718711 // return corresponding OpTypeForwardPointer.
0 commit comments