[llvm] caee04c - [NFC][SPIR-V] Remove unused helpers (#195804)

via llvm-commits llvm-commits at lists.llvm.org
Wed May 6 07:56:52 PDT 2026


Author: Arseniy Obolenskiy
Date: 2026-05-06T16:56:47+02:00
New Revision: caee04cbb3631b72ff4e4907cb63a4c1966e0e29

URL: https://github.com/llvm/llvm-project/commit/caee04cbb3631b72ff4e4907cb63a4c1966e0e29
DIFF: https://github.com/llvm/llvm-project/commit/caee04cbb3631b72ff4e4907cb63a4c1966e0e29.diff

LOG: [NFC][SPIR-V] Remove unused helpers (#195804)

Added: 
    

Modified: 
    llvm/lib/Target/SPIRV/SPIRVTargetObjectFile.h
    llvm/lib/Target/SPIRV/SPIRVUtils.h

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/SPIRV/SPIRVTargetObjectFile.h b/llvm/lib/Target/SPIRV/SPIRVTargetObjectFile.h
index 078af7b22d8ae..c89f30075595f 100644
--- a/llvm/lib/Target/SPIRV/SPIRVTargetObjectFile.h
+++ b/llvm/lib/Target/SPIRV/SPIRVTargetObjectFile.h
@@ -19,9 +19,6 @@ class SPIRVTargetObjectFile : public TargetLoweringObjectFile {
 public:
   ~SPIRVTargetObjectFile() override;
 
-  void Initialize(MCContext &ctx, const TargetMachine &TM) override {
-    TargetLoweringObjectFile::Initialize(ctx, TM);
-  }
   // All words in a SPIR-V module (excepting the first 5 ones) are a linear
   // sequence of instructions in a specific order. We put all the instructions
   // in the single text section.

diff  --git a/llvm/lib/Target/SPIRV/SPIRVUtils.h b/llvm/lib/Target/SPIRV/SPIRVUtils.h
index 50e8788d79b2d..a71320f8f443b 100644
--- a/llvm/lib/Target/SPIRV/SPIRVUtils.h
+++ b/llvm/lib/Target/SPIRV/SPIRVUtils.h
@@ -31,7 +31,6 @@
 namespace llvm {
 class MCInst;
 class MachineFunction;
-class MachineInstr;
 class MachineInstrBuilder;
 class MachineIRBuilder;
 class MachineRegisterInfo;
@@ -40,7 +39,6 @@ class StringRef;
 class SPIRVInstrInfo;
 class SPIRVSubtarget;
 class SPIRVGlobalRegistry;
-class SPIRVTypeInst;
 
 // This class implements a partial ordering visitor, which visits a cyclic graph
 // in natural topological-like ordering. Topological ordering is not defined for
@@ -398,13 +396,6 @@ inline Type *getPointeeTypeByAttr(Argument *Arg) {
   return nullptr;
 }
 
-inline Type *reconstructFunctionType(Function *F) {
-  SmallVector<Type *> ArgTys;
-  for (unsigned i = 0; i < F->arg_size(); ++i)
-    ArgTys.push_back(F->getArg(i)->getType());
-  return FunctionType::get(F->getReturnType(), ArgTys, F->isVarArg());
-}
-
 #define TYPED_PTR_TARGET_EXT_NAME "spirv.$TypedPointerType"
 inline Type *getTypedPointerWrapper(Type *ElemTy, unsigned AS) {
   return TargetExtType::get(ElemTy->getContext(), TYPED_PTR_TARGET_EXT_NAME,


        


More information about the llvm-commits mailing list