[llvm] d40eb0a - [SPIR-V] Remove deleted functions (#74660)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 7 06:37:35 PST 2023
Author: Natalie Chouinard
Date: 2023-12-07T09:37:31-05:00
New Revision: d40eb0a575297d31bb8d07ed82cb10c05bdbc0b6
URL: https://github.com/llvm/llvm-project/commit/d40eb0a575297d31bb8d07ed82cb10c05bdbc0b6
DIFF: https://github.com/llvm/llvm-project/commit/d40eb0a575297d31bb8d07ed82cb10c05bdbc0b6.diff
LOG: [SPIR-V] Remove deleted functions (#74660)
Remove references to functions that were deleted in #74521 which are
causing SPIR-V backend build failures.
Added:
Modified:
llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.cpp
llvm/lib/Target/SPIRV/SPIRVUtils.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.cpp b/llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.cpp
index 0e3fcf4701e62..f04ab4e3ebfb9 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 6cb51d782919d..0bd51436082d5 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) {
More information about the llvm-commits
mailing list