From 6af3e87d2d8d8964be6cd35d48b2dbf35c47015b Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Tue, 26 Oct 2021 23:38:14 -0700 Subject: [PATCH] [Hexagon] Remove set-but-unused variables (NFC) --- llvm/lib/Target/Hexagon/HexagonBitSimplify.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/llvm/lib/Target/Hexagon/HexagonBitSimplify.cpp b/llvm/lib/Target/Hexagon/HexagonBitSimplify.cpp index 1a9adf8..7f5cf15 100644 --- a/llvm/lib/Target/Hexagon/HexagonBitSimplify.cpp +++ b/llvm/lib/Target/Hexagon/HexagonBitSimplify.cpp @@ -1305,8 +1305,7 @@ bool RedundantInstrElimination::processBlock(MachineBasicBlock &B, return false; bool Changed = false; - for (auto I = B.begin(), E = B.end(), NextI = I; I != E; ++I) { - NextI = std::next(I); + for (auto I = B.begin(), E = B.end(); I != E; ++I) { MachineInstr *MI = &*I; if (MI->getOpcode() == TargetOpcode::COPY) @@ -1598,9 +1597,7 @@ bool CopyGeneration::processBlock(MachineBasicBlock &B, bool Changed = false; RegisterSet Defs; - for (auto I = B.begin(), E = B.end(), NextI = I; I != E; - ++I, AVB.insert(Defs)) { - NextI = std::next(I); + for (auto I = B.begin(), E = B.end(); I != E; ++I, AVB.insert(Defs)) { Defs.clear(); HBS::getInstrDefs(*I, Defs); -- 2.7.4