Skip to content

Commit d144c13

Browse files
[Target] Remove unused local variables (NFC) (#138443)
1 parent 5f4bc43 commit d144c13

19 files changed

+0
-28
lines changed

llvm/lib/Target/AArch64/AArch64ISelLowering.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -7974,7 +7974,6 @@ SDValue AArch64TargetLowering::LowerFormalArguments(
79747974
assert(Chain.getOpcode() == ISD::EntryToken && "Unexpected Chain value");
79757975
SDValue Glue = Chain.getValue(1);
79767976

7977-
SmallVector<SDValue, 16> ArgValues;
79787977
unsigned ExtraArgLocs = 0;
79797978
for (unsigned i = 0, e = Ins.size(); i != e; ++i) {
79807979
CCValAssign &VA = ArgLocs[i - ExtraArgLocs];
@@ -18253,7 +18252,6 @@ static SDValue performVecReduceAddCombine(SDNode *N, SelectionDAG &DAG,
1825318252
return VecReduceAdd16;
1825418253

1825518254
// Generate the remainder Dot operation that is multiple of 8.
18256-
SmallVector<SDValue, 4> SDotVec8;
1825718255
SDValue Zeros = DAG.getConstant(0, DL, MVT::v2i32);
1825818256
SDValue Vec8Op0 =
1825918257
DAG.getNode(ISD::EXTRACT_SUBVECTOR, DL, MVT::v8i8, A.getOperand(0),

llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -1192,7 +1192,6 @@ bool AArch64RegisterInfo::getRegAllocationHints(
11921192
// operands. Look for a valid starting register for the group.
11931193
for (unsigned I = 0; I < StridedOrder.size(); ++I) {
11941194
MCPhysReg Reg = StridedOrder[I];
1195-
SmallVector<MCPhysReg> Regs;
11961195

11971196
// If the FORM_TRANSPOSE nodes use the ZPRMul classes, the starting
11981197
// register of the first load should be a multiple of 2 or 4.

llvm/lib/Target/AArch64/MCTargetDesc/AArch64ELFStreamer.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,6 @@ void AArch64TargetELFStreamer::finish() {
479479
}
480480
if (Syms.size() != NumSyms) {
481481
SmallVector<const MCSymbol *, 0> NewSyms;
482-
DenseMap<MCSection *, size_t> Cnt;
483482
Syms.truncate(NumSyms);
484483
// Find the last symbol index for each candidate section.
485484
for (auto [I, Sym] : llvm::enumerate(Syms)) {

llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -1539,8 +1539,6 @@ bool AMDGPUCallLowering::lowerCall(MachineIRBuilder &MIRBuilder,
15391539
}
15401540

15411541
// Do the actual argument marshalling.
1542-
SmallVector<Register, 8> PhysRegs;
1543-
15441542
OutgoingValueAssigner Assigner(AssignFnFixed, AssignFnVarArg);
15451543
if (!determineAssignments(Assigner, OutArgs, CCInfo))
15461544
return false;

llvm/lib/Target/AMDGPU/AMDGPUIGroupLP.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -957,8 +957,6 @@ class MFMAExpInterleaveOpt final : public IGLPStrategy {
957957
auto *DAG = SyncPipe[0].DAG;
958958

959959
if (Cache->empty()) {
960-
SmallVector<SUnit *, 8> Worklist;
961-
962960
auto I = DAG->SUnits.begin();
963961
auto E = DAG->SUnits.end();
964962
for (; I != E; I++) {
@@ -1290,7 +1288,6 @@ class MFMAExpInterleaveOpt final : public IGLPStrategy {
12901288
bool apply(const SUnit *SU, const ArrayRef<SUnit *> Collection,
12911289
SmallVectorImpl<SchedGroup> &SyncPipe) override {
12921290

1293-
SmallVector<SUnit *, 12> Worklist;
12941291
auto *DAG = SyncPipe[0].DAG;
12951292
if (Cache->empty()) {
12961293
for (auto &SU : DAG->SUnits)

llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -1135,7 +1135,6 @@ bool AMDGPURegisterBankInfo::applyMappingLoad(
11351135
if (LoadSize <= MaxNonSmrdLoadSize)
11361136
return false;
11371137

1138-
SmallVector<Register, 16> DefRegs(OpdMapper.getVRegs(0));
11391138
SmallVector<Register, 1> SrcRegs(OpdMapper.getVRegs(1));
11401139

11411140
if (SrcRegs.empty())

llvm/lib/Target/AMDGPU/R600ISelLowering.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -1463,7 +1463,6 @@ SDValue R600TargetLowering::LowerFormalArguments(
14631463
CCState CCInfo(CallConv, isVarArg, DAG.getMachineFunction(), ArgLocs,
14641464
*DAG.getContext());
14651465
MachineFunction &MF = DAG.getMachineFunction();
1466-
SmallVector<ISD::InputArg, 8> LocalIns;
14671466

14681467
if (AMDGPU::isShader(CallConv)) {
14691468
CCInfo.AnalyzeFormalArguments(Ins, CCAssignFnForCall(CallConv, isVarArg));

llvm/lib/Target/AMDGPU/SIFoldOperands.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -1629,7 +1629,6 @@ bool SIFoldOperandsImpl::foldCopyToAGPRRegSequence(MachineInstr *CopyMI) const {
16291629

16301630
MachineInstrBuilder B(*MBB.getParent(), CopyMI);
16311631
DenseMap<TargetInstrInfo::RegSubRegPair, Register> VGPRCopies;
1632-
SmallSetVector<TargetInstrInfo::RegSubRegPair, 32> SeenInputs;
16331632

16341633
const TargetRegisterClass *UseRC =
16351634
MRI->getRegClass(CopyMI->getOperand(1).getReg());

llvm/lib/Target/AMDGPU/SIISelLowering.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -3235,7 +3235,6 @@ SITargetLowering::LowerReturn(SDValue Chain, CallingConv::ID CallConv,
32353235

32363236
// CCValAssign - represent the assignment of the return value to a location.
32373237
SmallVector<CCValAssign, 48> RVLocs;
3238-
SmallVector<ISD::OutputArg, 48> Splits;
32393238

32403239
// CCState - Info about the registers and stack slots.
32413240
CCState CCInfo(CallConv, isVarArg, DAG.getMachineFunction(), RVLocs,

llvm/lib/Target/ARM/ARMFrameLowering.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -1891,7 +1891,6 @@ void ARMFrameLowering::emitFPStatusRestores(
18911891
MachineFunction &MF = *MBB.getParent();
18921892
const TargetInstrInfo &TII = *MF.getSubtarget().getInstrInfo();
18931893

1894-
SmallVector<MCRegister> Regs;
18951894
auto RegPresent = [&CSI](MCRegister Reg) {
18961895
return llvm::any_of(CSI, [Reg](const CalleeSavedInfo &C) {
18971896
return C.getReg() == Reg;

llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -2436,7 +2436,6 @@ static bool canTailPredicateLoop(Loop *L, LoopInfo *LI, ScalarEvolution &SE,
24362436

24372437
// Next, check that all instructions can be tail-predicated.
24382438
PredicatedScalarEvolution PSE = LAI->getPSE();
2439-
SmallVector<Instruction *, 16> LoadStores;
24402439
int ICmpCount = 0;
24412440

24422441
for (BasicBlock *BB : L->blocks()) {

llvm/lib/Target/Hexagon/AsmParser/HexagonAsmParser.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -1348,7 +1348,6 @@ int HexagonAsmParser::processInstruction(MCInst &Inst,
13481348
MCContext &Context = getParser().getContext();
13491349
const MCRegisterInfo *RI = getContext().getRegisterInfo();
13501350
const std::string r = "r";
1351-
const std::string v = "v";
13521351
const std::string Colon = ":";
13531352
using RegPairVals = std::pair<unsigned, unsigned>;
13541353
auto GetRegPair = [this, r](RegPairVals RegPair) {

llvm/lib/Target/Hexagon/HexagonVectorLoopCarriedReuse.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,6 @@ void HexagonVectorLoopCarriedReuse::reuseValue() {
519519
SmallVector<Instruction *, 4> InstsInPreheader;
520520
for (int i = 0; i < Iterations; ++i) {
521521
Instruction *InstInPreheader = Inst2Replace->clone();
522-
SmallVector<Value *, 4> Ops;
523522
for (int j = 0; j < NumOperands; ++j) {
524523
Instruction *I = dyn_cast<Instruction>(Inst2Replace->getOperand(j));
525524
if (!I)

llvm/lib/Target/Mips/MipsCallLowering.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,6 @@ bool MipsCallLowering::lowerReturn(MachineIRBuilder &MIRBuilder,
334334
splitToValueTypes(ArgRetInfo, RetInfos, DL, F.getCallingConv());
335335

336336
SmallVector<CCValAssign, 16> ArgLocs;
337-
SmallVector<ISD::OutputArg, 8> Outs;
338337

339338
MipsCCState CCInfo(F.getCallingConv(), F.isVarArg(), MF, ArgLocs,
340339
F.getContext());
@@ -383,8 +382,6 @@ bool MipsCallLowering::lowerFormalArguments(MachineIRBuilder &MIRBuilder,
383382
++i;
384383
}
385384

386-
SmallVector<ISD::InputArg, 8> Ins;
387-
388385
SmallVector<CCValAssign, 16> ArgLocs;
389386
MipsCCState CCInfo(F.getCallingConv(), F.isVarArg(), MF, ArgLocs,
390387
F.getContext());
@@ -554,7 +551,6 @@ bool MipsCallLowering::lowerCall(MachineIRBuilder &MIRBuilder,
554551
F.getCallingConv());
555552

556553
const std::string FuncName = F.getName().str();
557-
SmallVector<ISD::InputArg, 8> Ins;
558554
SmallVector<CCValAssign, 8> ArgLocs;
559555
MipsIncomingValueAssigner Assigner(TLI.CCAssignFnForReturn(),
560556
FuncName.c_str(),

llvm/lib/Target/RISCV/GISel/RISCVCallLowering.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,6 @@ bool RISCVCallLowering::lowerFormalArguments(MachineIRBuilder &MIRBuilder,
552552
if (!FLI.CanLowerReturn)
553553
insertSRetIncomingArgument(F, SplitArgInfos, FLI.DemoteRegister, MRI, DL);
554554

555-
SmallVector<Type *, 4> TypeList;
556555
unsigned Index = 0;
557556
for (auto &Arg : F.args()) {
558557
// Construct the ArgInfo object from destination register and argument type.
@@ -608,7 +607,6 @@ bool RISCVCallLowering::lowerCall(MachineIRBuilder &MIRBuilder,
608607
MIRBuilder.buildInstr(RISCV::ADJCALLSTACKDOWN);
609608

610609
SmallVector<ArgInfo, 32> SplitArgInfos;
611-
SmallVector<ISD::OutputArg, 8> Outs;
612610
for (auto &AInfo : Info.OrigArgs) {
613611
// Handle any required unmerging of split value types from a given VReg into
614612
// physical registers. ArgInfo objects are constructed correspondingly and

llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -1707,7 +1707,6 @@ void WebAssemblyLowerEmscriptenEHSjLj::handleLongjmpableCallsForWasmSjLj(
17071707
// BB. If the call is enclosed in another catchpad/cleanuppad scope, unwind
17081708
// to its parent pad's unwind destination instead to preserve the scope
17091709
// structure. It will eventually unwind to the catch.dispatch.longjmp.
1710-
SmallVector<OperandBundleDef, 1> Bundles;
17111710
BasicBlock *UnwindDest = nullptr;
17121711
if (auto Bundle = CI->getOperandBundle(LLVMContext::OB_funclet)) {
17131712
Instruction *FromPad = cast<Instruction>(Bundle->Inputs[0]);

llvm/lib/Target/X86/X86ISelLowering.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -21121,7 +21121,6 @@ static SDValue LowerTruncateVecPackWithSignBits(
2112121121
// If the upper half of the source is undef, then attempt to split and
2112221122
// only truncate the lower half.
2112321123
if (DstVT.getSizeInBits() >= 128) {
21124-
SmallVector<SDValue> LowerOps;
2112521124
if (SDValue Lo = isUpperSubvectorUndef(In, DL, DAG)) {
2112621125
MVT DstHalfVT = DstVT.getHalfNumVectorElementsVT();
2112721126
if (SDValue Res = LowerTruncateVecPackWithSignBits(DstHalfVT, Lo, DL,
@@ -21164,7 +21163,6 @@ static SDValue LowerTruncateVecPack(MVT DstVT, SDValue In, const SDLoc &DL,
2116421163
// If the upper half of the source is undef, then attempt to split and
2116521164
// only truncate the lower half.
2116621165
if (DstVT.getSizeInBits() >= 128) {
21167-
SmallVector<SDValue> LowerOps;
2116821166
if (SDValue Lo = isUpperSubvectorUndef(In, DL, DAG)) {
2116921167
MVT DstHalfVT = DstVT.getHalfNumVectorElementsVT();
2117021168
if (SDValue Res = LowerTruncateVecPack(DstHalfVT, Lo, DL, Subtarget, DAG))

llvm/lib/Target/X86/X86LoadValueInjectionLoadHardening.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,6 @@ X86LoadValueInjectionLoadHardeningPass::getGadgetGraph(
414414

415415
// Check whether the use propagates to more defs.
416416
NodeAddr<InstrNode *> Owner{Use.Addr->getOwner(DFG)};
417-
rdf::NodeList AnalyzedChildDefs;
418417
for (const auto &ChildDef :
419418
Owner.Addr->members_if(DataFlowGraph::IsDef, DFG)) {
420419
if (!DefsVisited.insert(ChildDef.Id).second)

llvm/lib/Target/X86/X86LowerAMXType.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -1198,7 +1198,6 @@ bool X86LowerAMXCast::combineLdSt(SmallVectorImpl<Instruction *> &Casts) {
11981198
for (auto *Store : DeadStores)
11991199
Store->eraseFromParent();
12001200
} else { // x86_cast_vector_to_tile
1201-
SmallVector<Instruction *, 2> DeadLoads;
12021201
auto *Load = dyn_cast<LoadInst>(Cast->getOperand(0));
12031202
if (!Load || !Load->hasOneUse())
12041203
continue;

0 commit comments

Comments
 (0)