]> granicus.if.org Git - llvm/commitdiff
Sparc: Avoid implicit iterator conversions, NFC
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 8 Jul 2016 19:41:40 +0000 (19:41 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 8 Jul 2016 19:41:40 +0000 (19:41 +0000)
Remove the only implicit conversions from MachineInstrBundleIterator to
MachineInstr* in the Sparc backend.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274913 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/Sparc/SparcInstrInfo.cpp

index b49aabb9596a567feb2cdf8dc6237762ce94f328..b7a5da4bbb8aa7b65a0c2340bf2756f1ebb7e5c7 100644 (file)
@@ -170,7 +170,7 @@ bool SparcInstrInfo::AnalyzeBranch(MachineBasicBlock &MBB,
     return false;
 
   // Get the last instruction in the block.
-  MachineInstr *LastInst = I;
+  MachineInstr *LastInst = &*I;
   unsigned LastOpc = LastInst->getOpcode();
 
   // If there is only one terminator instruction, process it.
@@ -188,7 +188,7 @@ bool SparcInstrInfo::AnalyzeBranch(MachineBasicBlock &MBB,
   }
 
   // Get the instruction before it if it is a terminator.
-  MachineInstr *SecondLastInst = I;
+  MachineInstr *SecondLastInst = &*I;
   unsigned SecondLastOpc = SecondLastInst->getOpcode();
 
   // If AllowModify is true and the block ends with two or more unconditional
@@ -203,7 +203,7 @@ bool SparcInstrInfo::AnalyzeBranch(MachineBasicBlock &MBB,
         TBB = LastInst->getOperand(0).getMBB();
         return false;
       } else {
-        SecondLastInst = I;
+        SecondLastInst = &*I;
         SecondLastOpc = SecondLastInst->getOpcode();
       }
     }