[llvm] d6a4a97 - [NFC][SPIRV] Remove dead helper `addStringImm(const StringRef &Str, IRBuilder<> &B, std::vector<Value *> &Args)` (#207923)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 7 02:05:21 PDT 2026
Author: Juan Manuel Martinez CaamaƱo
Date: 2026-07-07T11:05:15+02:00
New Revision: d6a4a97cb7a198121e5058d6c4c6b4552259a79d
URL: https://github.com/llvm/llvm-project/commit/d6a4a97cb7a198121e5058d6c4c6b4552259a79d
DIFF: https://github.com/llvm/llvm-project/commit/d6a4a97cb7a198121e5058d6c4c6b4552259a79d.diff
LOG: [NFC][SPIRV] Remove dead helper `addStringImm(const StringRef &Str, IRBuilder<> &B, std::vector<Value *> &Args)` (#207923)
The helper was unused.
Added:
Modified:
llvm/lib/Target/SPIRV/SPIRVUtils.cpp
llvm/lib/Target/SPIRV/SPIRVUtils.h
Removed:
################################################################################
diff --git a/llvm/lib/Target/SPIRV/SPIRVUtils.cpp b/llvm/lib/Target/SPIRV/SPIRVUtils.cpp
index 6fcab5db1e745..d335c0596332a 100644
--- a/llvm/lib/Target/SPIRV/SPIRVUtils.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVUtils.cpp
@@ -182,15 +182,6 @@ void addStringImm(const StringRef &Str, MachineInstrBuilder &MIB) {
}
}
-void addStringImm(const StringRef &Str, IRBuilder<> &B,
- std::vector<Value *> &Args) {
- const size_t PaddedLen = getPaddedLen(Str);
- for (unsigned i = 0; i < PaddedLen; i += 4) {
- // Add a vector element for the 32-bits of chars or padding.
- Args.push_back(B.getInt32(convertCharsToWord(Str, i)));
- }
-}
-
std::string getStringImm(const MachineInstr &MI, unsigned StartIndex) {
return getSPIRVStringOperand(MI, StartIndex);
}
diff --git a/llvm/lib/Target/SPIRV/SPIRVUtils.h b/llvm/lib/Target/SPIRV/SPIRVUtils.h
index b67287c628a33..c9f25d733d983 100644
--- a/llvm/lib/Target/SPIRV/SPIRVUtils.h
+++ b/llvm/lib/Target/SPIRV/SPIRVUtils.h
@@ -177,8 +177,6 @@ StringRef getOriginalAsmConstraints(const CallBase &CB);
// little-endian words.
void addStringImm(const StringRef &Str, MCInst &Inst);
void addStringImm(const StringRef &Str, MachineInstrBuilder &MIB);
-void addStringImm(const StringRef &Str, IRBuilder<> &B,
- std::vector<Value *> &Args);
// Read the series of integer operands back as a null-terminated string using
// the reverse of the logic in addStringImm.
More information about the llvm-commits
mailing list