Skip to content

Commit 47f391f

Browse files
[CodeGen] Remove unused local variables (NFC) (#138441)
1 parent a9699a3 commit 47f391f

File tree

8 files changed

+1
-14
lines changed

8 files changed

+1
-14
lines changed

llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2780,7 +2780,6 @@ removeUndefDbgLocsFromEntryBlock(const BasicBlock *BB,
27802780
};
27812781

27822782
bool Changed = false;
2783-
DenseMap<DebugVariable, std::pair<Value *, DIExpression *>> VariableMap;
27842783

27852784
// Scan over the entire block, not just over the instructions mapped by
27862785
// FnVarLocs, because wedges in FnVarLocs may only be separated by debug

llvm/lib/CodeGen/BranchRelaxation.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,6 @@ bool BranchRelaxation::fixupConditionalBranch(MachineInstr &MI) {
559559

560560
bool BranchRelaxation::fixupUnconditionalBranch(MachineInstr &MI) {
561561
MachineBasicBlock *MBB = MI.getParent();
562-
SmallVector<MachineOperand, 4> Cond;
563562
unsigned OldBrSize = TII->getInstSizeInBytes(MI);
564563
MachineBasicBlock *DestBB = TII->getBranchDestBlock(MI);
565564

llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1637,7 +1637,6 @@ bool ComplexDeinterleavingGraph::collectPotentialReductions(BasicBlock *B) {
16371637
if (Br->getSuccessor(0) != B && Br->getSuccessor(1) != B)
16381638
return false;
16391639

1640-
SmallVector<PHINode *> PHIs;
16411640
for (auto &PHI : B->phis()) {
16421641
if (PHI.getNumIncomingValues() != 2)
16431642
continue;
@@ -1806,7 +1805,6 @@ bool ComplexDeinterleavingGraph::checkNodes() {
18061805
}
18071806

18081807
// Find instructions that have users outside of chain
1809-
SmallVector<Instruction *, 2> OuterInstructions;
18101808
for (auto *I : AllInstructions) {
18111809
// Skip root nodes
18121810
if (RootToNode.count(I))

llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2060,7 +2060,6 @@ void LegalizerHelper::moreElementsVectorDst(MachineInstr &MI, LLT WideTy,
20602060
void LegalizerHelper::moreElementsVectorSrc(MachineInstr &MI, LLT MoreTy,
20612061
unsigned OpIdx) {
20622062
MachineOperand &MO = MI.getOperand(OpIdx);
2063-
SmallVector<Register, 8> Regs;
20642063
MO.setReg(MIRBuilder.buildPadVectorWithUndefElements(MoreTy, MO).getReg(0));
20652064
}
20662065

@@ -2151,7 +2150,6 @@ LegalizerHelper::widenScalarMergeValues(MachineInstr &MI, unsigned TypeIdx,
21512150
const int GCD = std::gcd(SrcSize, WideSize);
21522151
LLT GCDTy = LLT::scalar(GCD);
21532152

2154-
SmallVector<Register, 8> Parts;
21552153
SmallVector<Register, 8> NewMergeRegs;
21562154
SmallVector<Register, 8> Unmerges;
21572155
LLT WideDstTy = LLT::scalar(NumMerge * WideSize);
@@ -6643,7 +6641,6 @@ LegalizerHelper::narrowScalarExtract(MachineInstr &MI, unsigned TypeIdx,
66436641
int NumParts = SizeOp1 / NarrowSize;
66446642

66456643
SmallVector<Register, 2> SrcRegs, DstRegs;
6646-
SmallVector<uint64_t, 2> Indexes;
66476644
extractParts(MI.getOperand(1).getReg(), NarrowTy, NumParts, SrcRegs,
66486645
MIRBuilder, MRI);
66496646

@@ -6703,7 +6700,6 @@ LegalizerHelper::narrowScalarInsert(MachineInstr &MI, unsigned TypeIdx,
67036700
return UnableToLegalize;
67046701

67056702
SmallVector<Register, 2> SrcRegs, LeftoverRegs, DstRegs;
6706-
SmallVector<uint64_t, 2> Indexes;
67076703
LLT RegTy = MRI.getType(MI.getOperand(0).getReg());
67086704
LLT LeftoverTy;
67096705
extractParts(MI.getOperand(1).getReg(), RegTy, NarrowTy, LeftoverTy, SrcRegs,

llvm/lib/CodeGen/LiveDebugVariables.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1127,7 +1127,6 @@ void UserValue::computeIntervals(MachineRegisterInfo &MRI,
11271127
SlotIndex Idx = Defs[i].first;
11281128
DbgVariableValue DbgValue = Defs[i].second;
11291129
SmallDenseMap<unsigned, std::pair<LiveRange *, const VNInfo *>> LIs;
1130-
SmallVector<const VNInfo *, 4> VNIs;
11311130
bool ShouldExtendDef = false;
11321131
for (unsigned LocNo : DbgValue.loc_nos()) {
11331132
const MachineOperand &LocMO = locations[LocNo];

llvm/lib/CodeGen/ModuloSchedule.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -887,7 +887,6 @@ void ModuloScheduleExpander::addBranches(MachineBasicBlock &PreheaderBB,
887887

888888
// Start from the blocks connected to the kernel and work "out"
889889
// to the first prolog and the last epilog blocks.
890-
SmallVector<MachineInstr *, 4> PrevInsts;
891890
unsigned MaxIter = PrologBBs.size() - 1;
892891
for (unsigned i = 0, j = MaxIter; i <= MaxIter; ++i, --j) {
893892
// Add branches to the prolog that go to the corresponding
@@ -2590,7 +2589,6 @@ void ModuloScheduleExpanderMVE::generateKernel(
25902589
SmallVector<ValueMapTy> PhiVRMap;
25912590
PhiVRMap.resize(NumUnroll);
25922591
DenseMap<MachineInstr *, std::pair<int, int>> NewMIMap;
2593-
DenseMap<MachineInstr *, MachineInstr *> MIMapLastStage0;
25942592
for (int UnrollNum = 0; UnrollNum < NumUnroll; ++UnrollNum) {
25952593
for (MachineInstr *MI : Schedule.getInstructions()) {
25962594
if (MI->isPHI())

llvm/lib/CodeGen/RemoveLoadsIntoFakeUses.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ bool RemoveLoadsIntoFakeUses::run(MachineFunction &MF) {
120120

121121
SmallVector<MachineInstr *> RegFakeUses;
122122
LivePhysRegs.init(*TRI);
123-
SmallVector<MachineInstr *, 16> Statepoints;
124123
for (MachineBasicBlock *MBB : post_order(&MF)) {
125124
RegFakeUses.clear();
126125
LivePhysRegs.addLiveOuts(*MBB);
@@ -152,7 +151,6 @@ bool RemoveLoadsIntoFakeUses::run(MachineFunction &MF) {
152151
// choose to ignore it so that this pass has no side effects unrelated
153152
// to fake uses.
154153
SmallDenseSet<MachineInstr *> FakeUsesToDelete;
155-
SmallVector<MachineInstr *> RemainingFakeUses;
156154
for (MachineInstr *&FakeUse : reverse(RegFakeUses)) {
157155
if (FakeUse->readsRegister(Reg, TRI)) {
158156
FakeUsesToDelete.insert(FakeUse);

llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6783,7 +6783,7 @@ TargetLowering::prepareUREMEqFold(EVT SETCCVT, SDValue REMNode,
67836783
bool HadEvenDivisor = false;
67846784
bool AllDivisorsArePowerOfTwo = true;
67856785
bool HadTautologicalInvertedLanes = false;
6786-
SmallVector<SDValue, 16> PAmts, KAmts, QAmts, IAmts;
6786+
SmallVector<SDValue, 16> PAmts, KAmts, QAmts;
67876787

67886788
auto BuildUREMPattern = [&](ConstantSDNode *CDiv, ConstantSDNode *CCmp) {
67896789
// Division by 0 is UB. Leave it to be constant-folded elsewhere.

0 commit comments

Comments
 (0)