Skip to content

Commit d40eb0a

Browse files
authored
[SPIR-V] Remove deleted functions (#74660)
Remove references to functions that were deleted in #74521 which are causing SPIR-V backend build failures.
1 parent ed61123 commit d40eb0a

File tree

2 files changed

+5
-13
lines changed

2 files changed

+5
-13
lines changed

llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.cpp

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -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.

llvm/lib/Target/SPIRV/SPIRVUtils.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -326,10 +326,9 @@ std::string getOclOrSpirvBuiltinDemangledName(StringRef Name) {
326326
}
327327

328328
const Type *getTypedPtrEltType(const Type *Ty) {
329-
auto PType = dyn_cast<PointerType>(Ty);
330-
if (!PType || PType->isOpaque())
331-
return Ty;
332-
return PType->getNonOpaquePointerElementType();
329+
// TODO: This function requires updating following the opaque pointer
330+
// migration.
331+
return Ty;
333332
}
334333

335334
bool hasBuiltinTypePrefix(StringRef Name) {

0 commit comments

Comments
 (0)