OSDN Git Service

[AArch64] Remove more dead code after r258093.
authorChad Rosier <mcrosier@codeaurora.org>
Tue, 19 Jan 2016 21:27:05 +0000 (21:27 +0000)
committerChad Rosier <mcrosier@codeaurora.org>
Tue, 19 Jan 2016 21:27:05 +0000 (21:27 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258191 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp

index be62459..8a3103c 100644 (file)
@@ -1380,16 +1380,12 @@ MachineBasicBlock::iterator AArch64LoadStoreOpt::findMatchingUpdateInsnForward(
   ModifiedRegs.resize(TRI->getNumRegs());
   UsedRegs.resize(TRI->getNumRegs());
   ++MBBI;
-  for (unsigned Count = 0; MBBI != E; ++MBBI) {
+  for (; MBBI != E; ++MBBI) {
     MachineInstr *MI = MBBI;
-    // Skip DBG_VALUE instructions. Otherwise debug info can affect the
-    // optimization by changing how far we scan.
+    // Skip DBG_VALUE instructions.
     if (MI->isDebugValue())
       continue;
 
-    // Now that we know this is a real instruction, count it.
-    ++Count;
-
     // If we found a match, return it.
     if (isMatchingUpdateInsn(I, MI, BaseReg, UnscaledOffset))
       return MBBI;
@@ -1434,16 +1430,12 @@ MachineBasicBlock::iterator AArch64LoadStoreOpt::findMatchingUpdateInsnBackward(
   ModifiedRegs.resize(TRI->getNumRegs());
   UsedRegs.resize(TRI->getNumRegs());
   --MBBI;
-  for (unsigned Count = 0; MBBI != B; --MBBI) {
+  for (; MBBI != B; --MBBI) {
     MachineInstr *MI = MBBI;
-    // Skip DBG_VALUE instructions. Otherwise debug info can affect the
-    // optimization by changing how far we scan.
+    // Skip DBG_VALUE instructions.
     if (MI->isDebugValue())
       continue;
 
-    // Now that we know this is a real instruction, count it.
-    ++Count;
-
     // If we found a match, return it.
     if (isMatchingUpdateInsn(I, MI, BaseReg, Offset))
       return MBBI;