diff --git a/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp b/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp index 6c222e159419e..ffdf08eec9963 100644 --- a/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp +++ b/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp @@ -2780,7 +2780,6 @@ removeUndefDbgLocsFromEntryBlock(const BasicBlock *BB, }; bool Changed = false; - DenseMap> VariableMap; // Scan over the entire block, not just over the instructions mapped by // FnVarLocs, because wedges in FnVarLocs may only be separated by debug diff --git a/llvm/lib/CodeGen/BranchRelaxation.cpp b/llvm/lib/CodeGen/BranchRelaxation.cpp index fbdc784c928c2..2d50167faa085 100644 --- a/llvm/lib/CodeGen/BranchRelaxation.cpp +++ b/llvm/lib/CodeGen/BranchRelaxation.cpp @@ -559,7 +559,6 @@ bool BranchRelaxation::fixupConditionalBranch(MachineInstr &MI) { bool BranchRelaxation::fixupUnconditionalBranch(MachineInstr &MI) { MachineBasicBlock *MBB = MI.getParent(); - SmallVector Cond; unsigned OldBrSize = TII->getInstSizeInBytes(MI); MachineBasicBlock *DestBB = TII->getBranchDestBlock(MI); diff --git a/llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp b/llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp index 790edf12b46be..f4fe0b3970d4c 100644 --- a/llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp +++ b/llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp @@ -1637,7 +1637,6 @@ bool ComplexDeinterleavingGraph::collectPotentialReductions(BasicBlock *B) { if (Br->getSuccessor(0) != B && Br->getSuccessor(1) != B) return false; - SmallVector PHIs; for (auto &PHI : B->phis()) { if (PHI.getNumIncomingValues() != 2) continue; @@ -1806,7 +1805,6 @@ bool ComplexDeinterleavingGraph::checkNodes() { } // Find instructions that have users outside of chain - SmallVector OuterInstructions; for (auto *I : AllInstructions) { // Skip root nodes if (RootToNode.count(I)) diff --git a/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp b/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp index 4052060271331..a7e730eeff5ab 100644 --- a/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp +++ b/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp @@ -2060,7 +2060,6 @@ void LegalizerHelper::moreElementsVectorDst(MachineInstr &MI, LLT WideTy, void LegalizerHelper::moreElementsVectorSrc(MachineInstr &MI, LLT MoreTy, unsigned OpIdx) { MachineOperand &MO = MI.getOperand(OpIdx); - SmallVector Regs; MO.setReg(MIRBuilder.buildPadVectorWithUndefElements(MoreTy, MO).getReg(0)); } @@ -2151,7 +2150,6 @@ LegalizerHelper::widenScalarMergeValues(MachineInstr &MI, unsigned TypeIdx, const int GCD = std::gcd(SrcSize, WideSize); LLT GCDTy = LLT::scalar(GCD); - SmallVector Parts; SmallVector NewMergeRegs; SmallVector Unmerges; LLT WideDstTy = LLT::scalar(NumMerge * WideSize); @@ -6644,7 +6642,6 @@ LegalizerHelper::narrowScalarExtract(MachineInstr &MI, unsigned TypeIdx, int NumParts = SizeOp1 / NarrowSize; SmallVector SrcRegs, DstRegs; - SmallVector Indexes; extractParts(MI.getOperand(1).getReg(), NarrowTy, NumParts, SrcRegs, MIRBuilder, MRI); @@ -6704,7 +6701,6 @@ LegalizerHelper::narrowScalarInsert(MachineInstr &MI, unsigned TypeIdx, return UnableToLegalize; SmallVector SrcRegs, LeftoverRegs, DstRegs; - SmallVector Indexes; LLT RegTy = MRI.getType(MI.getOperand(0).getReg()); LLT LeftoverTy; extractParts(MI.getOperand(1).getReg(), RegTy, NarrowTy, LeftoverTy, SrcRegs, diff --git a/llvm/lib/CodeGen/LiveDebugVariables.cpp b/llvm/lib/CodeGen/LiveDebugVariables.cpp index 36e53c83bcfc1..f12f437c493e1 100644 --- a/llvm/lib/CodeGen/LiveDebugVariables.cpp +++ b/llvm/lib/CodeGen/LiveDebugVariables.cpp @@ -1127,7 +1127,6 @@ void UserValue::computeIntervals(MachineRegisterInfo &MRI, SlotIndex Idx = Defs[i].first; DbgVariableValue DbgValue = Defs[i].second; SmallDenseMap> LIs; - SmallVector VNIs; bool ShouldExtendDef = false; for (unsigned LocNo : DbgValue.loc_nos()) { const MachineOperand &LocMO = locations[LocNo]; diff --git a/llvm/lib/CodeGen/ModuloSchedule.cpp b/llvm/lib/CodeGen/ModuloSchedule.cpp index f028f01c58290..0f742c46fd1b3 100644 --- a/llvm/lib/CodeGen/ModuloSchedule.cpp +++ b/llvm/lib/CodeGen/ModuloSchedule.cpp @@ -887,7 +887,6 @@ void ModuloScheduleExpander::addBranches(MachineBasicBlock &PreheaderBB, // Start from the blocks connected to the kernel and work "out" // to the first prolog and the last epilog blocks. - SmallVector PrevInsts; unsigned MaxIter = PrologBBs.size() - 1; for (unsigned i = 0, j = MaxIter; i <= MaxIter; ++i, --j) { // Add branches to the prolog that go to the corresponding @@ -2590,7 +2589,6 @@ void ModuloScheduleExpanderMVE::generateKernel( SmallVector PhiVRMap; PhiVRMap.resize(NumUnroll); DenseMap> NewMIMap; - DenseMap MIMapLastStage0; for (int UnrollNum = 0; UnrollNum < NumUnroll; ++UnrollNum) { for (MachineInstr *MI : Schedule.getInstructions()) { if (MI->isPHI()) diff --git a/llvm/lib/CodeGen/RemoveLoadsIntoFakeUses.cpp b/llvm/lib/CodeGen/RemoveLoadsIntoFakeUses.cpp index 042fc13090ef6..0c05473c7449b 100644 --- a/llvm/lib/CodeGen/RemoveLoadsIntoFakeUses.cpp +++ b/llvm/lib/CodeGen/RemoveLoadsIntoFakeUses.cpp @@ -120,7 +120,6 @@ bool RemoveLoadsIntoFakeUses::run(MachineFunction &MF) { SmallVector RegFakeUses; LivePhysRegs.init(*TRI); - SmallVector Statepoints; for (MachineBasicBlock *MBB : post_order(&MF)) { RegFakeUses.clear(); LivePhysRegs.addLiveOuts(*MBB); @@ -152,7 +151,6 @@ bool RemoveLoadsIntoFakeUses::run(MachineFunction &MF) { // choose to ignore it so that this pass has no side effects unrelated // to fake uses. SmallDenseSet FakeUsesToDelete; - SmallVector RemainingFakeUses; for (MachineInstr *&FakeUse : reverse(RegFakeUses)) { if (FakeUse->readsRegister(Reg, TRI)) { FakeUsesToDelete.insert(FakeUse); diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp index 6930b54ddb14a..083173daae982 100644 --- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp @@ -6783,7 +6783,7 @@ TargetLowering::prepareUREMEqFold(EVT SETCCVT, SDValue REMNode, bool HadEvenDivisor = false; bool AllDivisorsArePowerOfTwo = true; bool HadTautologicalInvertedLanes = false; - SmallVector PAmts, KAmts, QAmts, IAmts; + SmallVector PAmts, KAmts, QAmts; auto BuildUREMPattern = [&](ConstantSDNode *CDiv, ConstantSDNode *CCmp) { // Division by 0 is UB. Leave it to be constant-folded elsewhere.