[llvm] [SPIR-V] Remove deleted functions (PR #74660)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 6 14:06:36 PST 2023
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-spir-v
Author: Natalie Chouinard (sudonatalie)
<details>
<summary>Changes</summary>
Remove 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:
- (modified) llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.cpp (+2-9)
- (modified) llvm/lib/Target/SPIRV/SPIRVUtils.cpp (+3-4)
``````````diff
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) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/74660
More information about the llvm-commits
mailing list