-
Notifications
You must be signed in to change notification settings - Fork 10.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPIR-V] Remove deleted functions #74660
Conversation
Remove references to functions that were removed in llvm#74521 causing SPIR-V backend build failures.
@llvm/pr-subscribers-backend-spir-v Author: Natalie Chouinard (sudonatalie) ChangesRemove references to functions that were deleted in #74521 which are causing SPIR-V backend build failures. Full diff: https://github.com/llvm/llvm-project/pull/74660.diff 2 Files Affected:
diff --git a/llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.cpp b/llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.cpp
index 0e3fcf4701e622..f04ab4e3ebfb9e 100644
--- a/llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.cpp
@@ -690,9 +690,7 @@ SPIRVType *SPIRVGlobalRegistry::createSPIRVType(
return getOpTypeArray(Ty->getArrayNumElements(), El, MIRBuilder, EmitIR);
}
if (auto SType = dyn_cast<StructType>(Ty)) {
- if (SType->isOpaque())
- return getOpTypeOpaque(SType, MIRBuilder);
- return getOpTypeStruct(SType, MIRBuilder, EmitIR);
+ return getOpTypeOpaque(SType, MIRBuilder);
}
if (auto FType = dyn_cast<FunctionType>(Ty)) {
SPIRVType *RetTy = findSPIRVType(FType->getReturnType(), MIRBuilder);
@@ -707,12 +705,7 @@ SPIRVType *SPIRVGlobalRegistry::createSPIRVType(
// At the moment, all opaque pointers correspond to i8 element type.
// TODO: change the implementation once opaque pointers are supported
// in the SPIR-V specification.
- if (PType->isOpaque())
- SpvElementType = getOrCreateSPIRVIntegerType(8, MIRBuilder);
- else
- SpvElementType =
- findSPIRVType(PType->getNonOpaquePointerElementType(), MIRBuilder,
- SPIRV::AccessQualifier::ReadWrite, EmitIR);
+ SpvElementType = getOrCreateSPIRVIntegerType(8, MIRBuilder);
auto SC = addressSpaceToStorageClass(PType->getAddressSpace());
// Null pointer means we have a loop in type definitions, make and
// return corresponding OpTypeForwardPointer.
diff --git a/llvm/lib/Target/SPIRV/SPIRVUtils.cpp b/llvm/lib/Target/SPIRV/SPIRVUtils.cpp
index 6cb51d782919d5..0bd51436082d5f 100644
--- a/llvm/lib/Target/SPIRV/SPIRVUtils.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVUtils.cpp
@@ -326,10 +326,9 @@ std::string getOclOrSpirvBuiltinDemangledName(StringRef Name) {
}
const Type *getTypedPtrEltType(const Type *Ty) {
- auto PType = dyn_cast<PointerType>(Ty);
- if (!PType || PType->isOpaque())
- return Ty;
- return PType->getNonOpaquePointerElementType();
+ // TODO: This function requires updating following the opaque pointer
+ // migration.
+ return Ty;
}
bool hasBuiltinTypePrefix(StringRef Name) {
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's NFC and fixes the build. LGTM
Remove references to functions that were deleted in #74521 which are causing SPIR-V backend build failures.