[llvm] r274913 - Sparc: Avoid implicit iterator conversions, NFC

Duncan P. N. Exon Smith via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 8 12:41:40 PDT 2016


Author: dexonsmith
Date: Fri Jul  8 14:41:40 2016
New Revision: 274913

URL: http://llvm.org/viewvc/llvm-project?rev=274913&view=rev
Log:
Sparc: Avoid implicit iterator conversions, NFC

Remove the only implicit conversions from MachineInstrBundleIterator to
MachineInstr* in the Sparc backend.

Modified:
    llvm/trunk/lib/Target/Sparc/SparcInstrInfo.cpp

Modified: llvm/trunk/lib/Target/Sparc/SparcInstrInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/SparcInstrInfo.cpp?rev=274913&r1=274912&r2=274913&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Sparc/SparcInstrInfo.cpp (original)
+++ llvm/trunk/lib/Target/Sparc/SparcInstrInfo.cpp Fri Jul  8 14:41:40 2016
@@ -170,7 +170,7 @@ bool SparcInstrInfo::AnalyzeBranch(Machi
     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(Machi
   }
 
   // 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(Machi
         TBB = LastInst->getOperand(0).getMBB();
         return false;
       } else {
-        SecondLastInst = I;
+        SecondLastInst = &*I;
         SecondLastOpc = SecondLastInst->getOpcode();
       }
     }




More information about the llvm-commits mailing list