Skip to content

Commit c51a3aa

Browse files
[llvm] Remove unused local variables (NFC) (#138467)
1 parent 142f99a commit c51a3aa

File tree

16 files changed

+0
-33
lines changed

16 files changed

+0
-33
lines changed

llvm/lib/Analysis/ModuleSummaryAnalysis.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,6 @@ static void computeFunctionSummary(
523523
auto *MemProfMD = I.getMetadata(LLVMContext::MD_memprof);
524524
if (MemProfMD) {
525525
std::vector<MIBInfo> MIBs;
526-
std::vector<uint64_t> TotalSizes;
527526
std::vector<std::vector<ContextTotalSize>> ContextSizeInfos;
528527
for (auto &MDOp : MemProfMD->operands()) {
529528
auto *MIBMD = cast<const MDNode>(MDOp);

llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

-5
Original file line numberDiff line numberDiff line change
@@ -15197,10 +15197,7 @@ SDValue DAGCombiner::visitSIGN_EXTEND_INREG(SDNode *N) {
1519715197
if (ISD::isExtVecInRegOpcode(N0.getOpcode())) {
1519815198
SDValue N00 = N0.getOperand(0);
1519915199
unsigned N00Bits = N00.getScalarValueSizeInBits();
15200-
unsigned DstElts = N0.getValueType().getVectorMinNumElements();
15201-
unsigned SrcElts = N00.getValueType().getVectorMinNumElements();
1520215200
bool IsZext = N0.getOpcode() == ISD::ZERO_EXTEND_VECTOR_INREG;
15203-
APInt DemandedSrcElts = APInt::getLowBitsSet(SrcElts, DstElts);
1520415201
if ((N00Bits == ExtVTBits ||
1520515202
(!IsZext && (N00Bits < ExtVTBits ||
1520615203
DAG.ComputeMaxSignificantBits(N00) <= ExtVTBits))) &&
@@ -20772,8 +20769,6 @@ SDValue DAGCombiner::TransformFPLoadStorePair(SDNode *N) {
2077220769
// We're checking for cases where we have common "c3 * A" expressions.
2077320770
bool DAGCombiner::isMulAddWithConstProfitable(SDNode *MulNode, SDValue AddNode,
2077420771
SDValue ConstNode) {
20775-
APInt Val;
20776-
2077720772
// If the add only has one use, and the target thinks the folding is
2077820773
// profitable or does not lead to worse code, this would be OK to do.
2077920774
if (AddNode->hasOneUse() &&

llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -7965,7 +7965,6 @@ bool TargetLowering::expandDIVREMByConstant(SDNode *N,
79657965
// If we shifted the input, shift the remainder left and add the bits we
79667966
// shifted off the input.
79677967
if (TrailingZeros) {
7968-
APInt Mask = APInt::getLowBitsSet(HBitWidth, TrailingZeros);
79697968
RemL = DAG.getNode(ISD::SHL, dl, HiLoVT, RemL,
79707969
DAG.getShiftAmountConstant(TrailingZeros, HiLoVT, dl));
79717970
RemL = DAG.getNode(ISD::ADD, dl, HiLoVT, RemL, PartialRem);

llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -454,10 +454,6 @@ unsigned DWARFVerifier::verifyUnitSection(const DWARFSection &S) {
454454
bool hasDIE = DebugInfoData.isValidOffset(Offset);
455455
DWARFUnitVector TypeUnitVector;
456456
DWARFUnitVector CompileUnitVector;
457-
/// A map that tracks all references (converted absolute references) so we
458-
/// can verify each reference points to a valid DIE and not an offset that
459-
/// lies between to valid DIEs.
460-
ReferenceMap CrossUnitReferences;
461457
while (hasDIE) {
462458
if (!verifyUnitHeader(DebugInfoData, &Offset, UnitIdx, UnitType,
463459
isUnitDWARF64)) {

llvm/lib/ExecutionEngine/Orc/TargetProcess/SimpleRemoteEPCServer.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,6 @@ Error SimpleRemoteEPCServer::sendSetupMessage(
191191

192192
using namespace SimpleRemoteEPCDefaultBootstrapSymbolNames;
193193

194-
std::vector<char> SetupPacket;
195194
SimpleRemoteEPCExecutorInfo EI;
196195
EI.TargetTriple = sys::getProcessTriple();
197196
if (auto PageSize = sys::Process::getPageSize())

llvm/lib/ObjCopy/wasm/WasmReader.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ Expected<std::unique_ptr<Object>> Reader::create() const {
1919
auto Obj = std::make_unique<Object>();
2020
Obj->Header = WasmObj.getHeader();
2121
Obj->isRelocatableObject = WasmObj.isRelocatableObject();
22-
std::vector<Section> Sections;
2322
Obj->Sections.reserve(WasmObj.getNumSections());
2423
for (const SectionRef &Sec : WasmObj.sections()) {
2524
const WasmSection &WS = WasmObj.getWasmSection(Sec);

llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -841,8 +841,6 @@ bool SIShrinkInstructions::run(MachineFunction &MF) {
841841

842842
unsigned VCCReg = ST->isWave32() ? AMDGPU::VCC_LO : AMDGPU::VCC;
843843

844-
std::vector<unsigned> I1Defs;
845-
846844
for (MachineFunction::iterator BI = MF.begin(), BE = MF.end();
847845
BI != BE; ++BI) {
848846

llvm/lib/Target/ARM/ARMSubtarget.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -489,8 +489,6 @@ ARMSubtarget::PushPopSplitVariation
489489
ARMSubtarget::getPushPopSplitVariation(const MachineFunction &MF) const {
490490
const Function &F = MF.getFunction();
491491
const MachineFrameInfo &MFI = MF.getFrameInfo();
492-
const std::vector<CalleeSavedInfo> CSI =
493-
MF.getFrameInfo().getCalleeSavedInfo();
494492

495493
// Thumb1 always splits the pushes at R7, because the Thumb1 push instruction
496494
// cannot use high registers except for lr.

llvm/lib/Target/Hexagon/HexagonConstExtenders.cpp

-6
Original file line numberDiff line numberDiff line change
@@ -1323,12 +1323,6 @@ void HCE::assignInits(const ExtRoot &ER, unsigned Begin, unsigned End,
13231323
// Select the definition points, and generate the assignment between
13241324
// these points and the uses.
13251325

1326-
// For each candidate offset, keep a pair CandData consisting of
1327-
// the total number of ranges containing that candidate, and the
1328-
// vector of corresponding RangeTree nodes.
1329-
using CandData = std::pair<unsigned, SmallVector<RangeTree::Node*,8>>;
1330-
std::map<int32_t, CandData> CandMap;
1331-
13321326
RangeTree Tree;
13331327
for (const OffsetRange &R : Ranges)
13341328
Tree.add(R);

llvm/lib/Transforms/IPO/IROutliner.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -2296,7 +2296,6 @@ void IROutliner::deduplicateExtractedSections(
22962296
fillOverallFunction(M, CurrentGroup, OutputStoreBBs, FuncsToRemove,
22972297
OutputMappings);
22982298

2299-
std::vector<Value *> SortedKeys;
23002299
for (unsigned Idx = 1; Idx < CurrentGroup.Regions.size(); Idx++) {
23012300
CurrentOS = CurrentGroup.Regions[Idx];
23022301
AttributeFuncs::mergeAttributesForOutlining(*CurrentGroup.OutlinedFunction,

llvm/tools/sancov/sancov.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -1003,7 +1003,6 @@ static void printNotCoveredFunctions(const SymbolizedCoverage &CovData,
10031003
// Read list of files and merges their coverage info.
10041004
static void readAndPrintRawCoverage(const std::vector<std::string> &FileNames,
10051005
raw_ostream &OS) {
1006-
std::vector<std::unique_ptr<RawCoverage>> Covs;
10071006
for (const auto &FileName : FileNames) {
10081007
auto Cov = RawCoverage::read(FileName);
10091008
if (!Cov)

llvm/unittests/DebugInfo/CodeView/TypeHashingTest.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ TEST(TypeHashingTest, ContentHash) {
9797
// LF_PROCEDURE 0x1004 {int** func(char**, int***)}
9898
// ArgList = 0x1003
9999
// ReturnType = 0x1001
100-
std::vector<GloballyHashedType> Ordering1Hashes;
101100
CharPP[0] = createPointerRecord(Ordering1, CharP);
102101
IntPP[0] = createPointerRecord(Ordering1, IntP);
103102
IntPPP[0] = createPointerRecord(Ordering1, IntPP[0]);

llvm/unittests/XRay/GraphTest.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,6 @@ template <typename T> void graphVertexTester(T &G) {
8585
}
8686

8787
template <typename T> void graphEdgeTester(T &G) {
88-
std::set<unsigned> V({1u, 2u, 3u, 4u, 5u, 6u});
89-
9088
std::set<std::pair<unsigned, unsigned>> E(
9189
{{1u, 2u}, {2u, 3u}, {6u, 3u}, {4u, 6u}, {2u, 4u}, {2u, 5u}, {4u, 5u}});
9290
std::vector<unsigned> VA({0u, 3u, 5u, 7u, 11u, 13u, 17u});

llvm/utils/TableGen/AsmWriterEmitter.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -869,9 +869,6 @@ void AsmWriterEmitter::EmitPrintAliasInstruction(raw_ostream &O) {
869869
DenseMap<const Record *, unsigned> MCOpPredicateMap;
870870

871871
for (auto &Aliases : AliasMap) {
872-
// Collection of instruction alias rules. May contain ambiguous rules.
873-
std::vector<IAPrinter> IAPs;
874-
875872
for (auto &Alias : Aliases.second) {
876873
const CodeGenInstAlias &CGA = Alias.first;
877874
unsigned LastOpNo = CGA.ResultInstOperandIndex.size();

llvm/utils/TableGen/DFAEmitter.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ void DfaEmitter::emit(StringRef Name, raw_ostream &OS) {
118118
OS << "// to by index in " << Name << "Transitions[].\n";
119119

120120
SequenceToOffsetTable<DfaTransitionInfo> Table;
121-
std::map<DfaTransitionInfo, unsigned> EmittedIndices;
122121
for (auto &T : DfaTransitions)
123122
Table.add(T.second.second);
124123
Table.layout();

llvm/utils/TableGen/GlobalISelCombinerEmitter.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,6 @@ void CombineRuleOperandTypeChecker::getInstEqClasses(
567567

568568
CombineRuleOperandTypeChecker::TypeEquivalenceClasses
569569
CombineRuleOperandTypeChecker::getRuleEqClasses() const {
570-
StringMap<unsigned> OpNameToEqClassIdx;
571570
TypeEquivalenceClasses TECs;
572571

573572
if (DebugTypeInfer)

0 commit comments

Comments
 (0)