Skip to content

Commit 2f3067e

Browse files
[llvm] Remove unused local variables (NFC) (#138454)
1 parent d144c13 commit 2f3067e

File tree

17 files changed

+2
-27
lines changed

17 files changed

+2
-27
lines changed

llvm/include/llvm/CodeGen/SDPatternMatch.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1156,7 +1156,6 @@ template <typename... PatternTs> struct ReassociatableOpc_match {
11561156
// std::get<J>(Patterns)) == true
11571157
std::array<SmallBitVector, NumPatterns> Matches;
11581158
for (size_t I = 0; I != NumPatterns; I++) {
1159-
SmallVector<bool> MatchResults;
11601159
std::apply(
11611160
[&](auto &...P) {
11621161
(Matches[I].push_back(sd_context_match(Leaves[I], Ctx, P)), ...);

llvm/include/llvm/Support/GenericLoopInfoImpl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ void LoopInfoBase<BlockT, LoopT>::analyze(const DomTreeBase<BlockT> &DomTree) {
604604
template <class BlockT, class LoopT>
605605
SmallVector<LoopT *, 4>
606606
LoopInfoBase<BlockT, LoopT>::getLoopsInPreorder() const {
607-
SmallVector<LoopT *, 4> PreOrderLoops, PreOrderWorklist;
607+
SmallVector<LoopT *, 4> PreOrderLoops;
608608
// The outer-most loop actually goes into the result in the same relative
609609
// order as we walk it. But LoopInfo stores the top level loops in reverse
610610
// program order so for here we reverse it to get forward program order.

llvm/lib/Analysis/BranchProbabilityInfo.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,6 @@ BranchProbabilityInfo::getEstimatedEdgeWeight(const LoopEdge &Edge) const {
666666
template <class IterT>
667667
std::optional<uint32_t> BranchProbabilityInfo::getMaxEstimatedEdgeWeight(
668668
const LoopBlock &SrcLoopBB, iterator_range<IterT> Successors) const {
669-
SmallVector<uint32_t, 4> Weights;
670669
std::optional<uint32_t> MaxWeight;
671670
for (const BasicBlock *DstBB : Successors) {
672671
const LoopBlock DstLoopBB = getLoopBlock(DstBB);

llvm/lib/Analysis/LoopAccessAnalysis.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1426,9 +1426,6 @@ void AccessAnalysis::processMemAccesses() {
14261426

14271427
// Create sets of pointers connected by a shared alias set and
14281428
// underlying object.
1429-
typedef SmallVector<const Value *, 16> ValueVector;
1430-
ValueVector TempObjects;
1431-
14321429
SmallVector<const Value *, 16> &UOs = UnderlyingObjects[Ptr];
14331430
UOs = {};
14341431
::getUnderlyingObjects(Ptr, UOs, LI);

llvm/lib/Bitcode/Reader/BitcodeReader.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3997,8 +3997,6 @@ Error BitcodeReader::rememberAndSkipFunctionBodies() {
39973997
// finished the parse greedily.
39983998
assert(SeenValueSymbolTable);
39993999

4000-
SmallVector<uint64_t, 64> Record;
4001-
40024000
while (true) {
40034001
Expected<llvm::BitstreamEntry> MaybeEntry = Stream.advance();
40044002
if (!MaybeEntry)

llvm/lib/ExecutionEngine/Orc/GetDylibInterface.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ Expected<SymbolNameSet> getDylibInterface(ExecutionSession &ES, Twine Path) {
111111
if (auto EC = identify_magic(Path, Magic))
112112
return createFileError(Path, EC);
113113

114-
SymbolNameSet Symbols;
115114
switch (Magic) {
116115
case file_magic::macho_universal_binary:
117116
case file_magic::macho_dynamically_linked_shared_lib:

llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4607,8 +4607,6 @@ OpenMPIRBuilder::applyWorkshareLoopTarget(DebugLoc DL, CanonicalLoopInfo *CLI,
46074607
SmallPtrSet<BasicBlock *, 32> ParallelRegionBlockSet;
46084608
SmallVector<BasicBlock *, 32> Blocks;
46094609
OI.collectBlocks(ParallelRegionBlockSet, Blocks);
4610-
SmallVector<BasicBlock *, 32> BlocksT(ParallelRegionBlockSet.begin(),
4611-
ParallelRegionBlockSet.end());
46124610

46134611
CodeExtractorAnalysisCache CEAC(*OuterFn);
46144612
CodeExtractor Extractor(Blocks,
@@ -4624,7 +4622,7 @@ OpenMPIRBuilder::applyWorkshareLoopTarget(DebugLoc DL, CanonicalLoopInfo *CLI,
46244622
/* AggrArgsIn0AddrSpace */ true);
46254623

46264624
BasicBlock *CommonExit = nullptr;
4627-
SetVector<Value *> Inputs, Outputs, SinkingCands, HoistingCands;
4625+
SetVector<Value *> SinkingCands, HoistingCands;
46284626

46294627
// Find allocas outside the loop body region which are used inside loop
46304628
// body

llvm/lib/IR/SafepointIRVerifier.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ class CFGDeadness {
157157
protected:
158158
void addDeadBlock(const BasicBlock *BB) {
159159
SmallVector<const BasicBlock *, 4> NewDead;
160-
SmallSetVector<const BasicBlock *, 4> DF;
161160

162161
NewDead.push_back(BB);
163162
while (!NewDead.empty()) {

llvm/lib/ObjCopy/CommonConfig.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ NameOrPattern::create(StringRef Pattern, MatchStyle MS,
1919
case MatchStyle::Literal:
2020
return NameOrPattern(Pattern);
2121
case MatchStyle::Wildcard: {
22-
SmallVector<char, 32> Data;
2322
bool IsPositiveMatch = !Pattern.consume_front("!");
2423
Expected<GlobPattern> GlobOrErr = GlobPattern::create(Pattern);
2524

llvm/lib/ProfileData/InstrProf.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,6 @@ Error InstrProfSymtab::create(Module &M, bool InLTO, bool AddCanonical) {
537537
return E;
538538
}
539539

540-
SmallVector<MDNode *, 2> Types;
541540
for (GlobalVariable &G : M.globals()) {
542541
if (!G.hasName() || !G.hasMetadata(LLVMContext::MD_type))
543542
continue;

0 commit comments

Comments
 (0)